TypeScript 97.5%
SQL 1.4%
Python 0.8%
1import type { Metadata } from "next";2import { redirect } from "next/navigation";3import { getUser } from "@/lib/session";4import { LoginForm } from "./login-form";56export const metadata: Metadata = { title: "Log in" };78export default async function LoginPage({ searchParams }: { searchParams: Promise<{ next?: string; verified?: string; reset?: string }> }) {9 const sp = await searchParams;10 const user = await getUser();11 if (user) redirect(sp.next && sp.next.startsWith("/") ? sp.next : "/dashboard");12 return <LoginForm next={sp.next} verified={sp.verified === "1"} reset={sp.reset === "1"} />;13}14