import type { Metadata } from "next"; import { redirect } from "next/navigation"; import { NarrowCard } from "@/components/narrow-card"; import { getMe } from "@/lib/api"; import { safeNext } from "@/lib/paths"; import { SignInForm } from "./signin-form"; export const metadata: Metadata = { title: "Sign in" }; export default async function SignIn({ searchParams }: { searchParams: Promise<{ next?: string | string[] }> }) { const next = safeNext((await searchParams).next); if (await getMe()) redirect(next); return ( ); }