fosrl.pangolin/src/app/auth/login/page.tsx

22 lines
486 B
TypeScript
Raw Normal View History

import LoginForm from "@app/components/LoginForm";
import { verifySession } from "@app/lib/verifySession";
import { redirect } from "next/navigation";
2024-10-06 09:55:45 -04:00
2024-10-06 20:54:27 -04:00
export default async function Page({
2024-10-06 19:37:53 -04:00
searchParams,
}: {
searchParams: { [key: string]: string | string[] | undefined };
}) {
2024-10-06 18:43:20 -04:00
const user = await verifySession();
2024-10-06 09:55:45 -04:00
if (user) {
redirect("/");
2024-10-06 09:55:45 -04:00
}
return (
<>
2024-10-06 19:37:53 -04:00
<LoginForm redirect={searchParams.redirect as string} />
</>
2024-10-06 09:55:45 -04:00
);
}