mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-02-13 19:15:44 +01:00
- Fix syntax errors in skills markdown files (.github/skills, .opencode/skills) - Change typescript to tsx for code blocks with JSX - Replace ellipsis (...) in array examples with valid syntax - Separate CSS from TypeScript into distinct code blocks - Convert JavaScript object examples to valid JSON in docs - Fix enum definitions with proper comma separation
47 lines
1.4 KiB
TypeScript
47 lines
1.4 KiB
TypeScript
"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 (
|
|
<div className="min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900">
|
|
<div className="text-center">Loading...</div>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<div className="min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900 relative">
|
|
<div className="absolute top-4 right-4">
|
|
<ThemeToggle />
|
|
</div>
|
|
<Card className="w-full max-w-md">
|
|
<CardHeader className="text-center">
|
|
<CardTitle className="text-2xl font-bold">Platform Login</CardTitle>
|
|
<p className="text-muted-foreground">
|
|
Sign in to the Notso AI platform management dashboard
|
|
</p>
|
|
</CardHeader>
|
|
<CardContent>
|
|
<AuthView pathname="sign-in" />
|
|
</CardContent>
|
|
</Card>
|
|
</div>
|
|
);
|
|
}
|