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