"use client"; import { AuthView } from "@neondatabase/auth/react"; import { useRouter } from "next/navigation"; import { useEffect } from "react"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { ThemeToggle } from "@/components/ui/theme-toggle"; import { authClient } from "@/lib/auth/client"; export default function PlatformLoginPage() { const router = useRouter(); const { data, isPending } = authClient.useSession(); useEffect(() => { if (!isPending && data?.session) { router.push("/platform/dashboard"); } }, [data, isPending, router]); if (isPending) { return (
Sign in to the Notso AI platform management dashboard