import { prisma } from "@streamclipper/db"; import { bootstrapAdmin, login } from "./actions"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "@/components/ui/card"; export const dynamic = "force-dynamic"; export default async function LoginPage({ searchParams }: { searchParams: Promise<{ error?: string }> }) { const { error } = await searchParams; const userCount = await prisma.user.count(); const isBootstrap = userCount === 0; return (
{isBootstrap ? "İlk Yönetici Hesabını Oluştur" : "Giriş Yap"} {isBootstrap && ( Henüz kullanıcı yok — panele erişecek ilk admin hesabını burada oluştur. )} {!isBootstrap && error &&

Kullanıcı adı veya şifre hatalı.

}
); }