import { redirect } from "next/navigation"; import { createClient } from "@/utils/supabase/server"; import LoginForm from "./login-form"; export default async function LoginPage({ searchParams, }: Readonly<{ searchParams: Promise<{ next?: string; error?: string }>; }>) { const supabase = await createClient(); const { data: { user }, } = await supabase.auth.getUser(); if (user) redirect("/profile"); const { next, error } = await searchParams; return (
); }