import type { Metadata } from "next";
import Link from "next/link";
import { MailCheck } from "lucide-react";
import { getUser } from "@/lib/session";
import { AuthCard } from "@/components/auth/auth-card";
import { Button } from "@/components/ui/button";
import { ResendVerificationButton } from "@/components/dashboard/resend-verification";
import { Alert } from "@/components/ui/alert";
export const metadata: Metadata = { title: "Verify your email" };
export default async function VerifyEmailPage({ searchParams }: { searchParams: Promise<{ error?: string }> }) {
const sp = await searchParams;
const user = await getUser();
if (user?.emailVerified) {
return (
Production API access is unlocked.
);
}
return (
We sent a link to {user.email}. Open it to activate production API access.> : "Log in to resend the verification email."}>
{sp.error ? The verification link is invalid or expired. Request a new one below. : null}
{user ? (