"use client";

import { useEffect } from "react";
import { useRouter } from "next/navigation";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";

export default function LoginPage() {
  const router = useRouter();

  useEffect(() => {
    // 已移除 Supabase 登录，统一走 Convex Auth 页面。
    router.replace("/auth");
  }, [router]);

  return (
    <div className="flex min-h-screen items-center justify-center bg-zinc-50 p-4">
      <Card className="w-[400px] space-y-4 bg-white/90 shadow-md backdrop-blur">
        <CardHeader>
          <CardTitle className="text-xl">正在跳转</CardTitle>
          <p className="text-sm text-zinc-500">该页面已迁移到 Convex Auth（/auth）。</p>
        </CardHeader>
        <CardContent className="space-y-3">
          <p className="text-sm text-zinc-700">如果没有自动跳转，请手动打开 /auth。</p>
        </CardContent>
      </Card>
    </div>
  );
}
