15 lines
332 B
TypeScript
15 lines
332 B
TypeScript
import { redirect } from "next/navigation";
|
|
|
|
import { AuthEntry } from "@/components/auth-entry";
|
|
import { isAuthenticated } from "@/lib/auth-server";
|
|
|
|
export default async function LoginPage() {
|
|
const isSessionActive = await isAuthenticated();
|
|
|
|
if (isSessionActive) {
|
|
redirect("/dashboard");
|
|
}
|
|
|
|
return <AuthEntry />;
|
|
}
|