HTMLify
page.tsx
Views: 1 | Author: biisal
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | import LoginForm from "@/components/auth/login-form"; import { auth } from "@/lib/auth"; import { headers } from "next/headers"; import { redirect } from "next/navigation"; import { toast } from "sonner"; export default async function LoginPage() { const session = await auth.api.getSession({ headers: await headers(), }); if (session) { redirect("/"); } return ( <div className="min-h-screen flex items-center justify-center p-4 bg-gradient-to-b from-midnightpurple via-midnightpurple to-black"> <LoginForm /> </div> ); } |