import type { Metadata } from "next"; import { LoginForm } from "../_components/login-form"; import { safeNext } from "../_components/auth-errors"; export const metadata: Metadata = { title: "Sign in", description: "Sign in to your PolyLLM workspace.", robots: { index: false, follow: true }, }; type Params = Record; function first(v: string | string[] | undefined): string | undefined { return Array.isArray(v) ? v[0] : v; } export default async function LoginPage({ searchParams }: { searchParams: Promise }) { const params = await searchParams; const next = safeNext(params.next); const raw = first(params.notice); const notice = raw === "reset" || raw === "verified" || raw === "signed-out" ? raw : undefined; return ; }