mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-13 16:36:41 +00:00
22 lines
456 B
TypeScript
22 lines
456 B
TypeScript
import VerifyEmailForm from "@app/components/auth/VerifyEmailForm";
|
|
import { verifySession } from "@app/lib/auth/verifySession";
|
|
import { redirect } from "next/navigation";
|
|
|
|
export default async function Page() {
|
|
const user = await verifySession();
|
|
|
|
if (!user) {
|
|
redirect("/");
|
|
}
|
|
|
|
if (user.emailVerified) {
|
|
redirect("/");
|
|
}
|
|
|
|
return (
|
|
<>
|
|
<VerifyEmailForm email={user.email}/>
|
|
</>
|
|
);
|
|
}
|