mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 10:52:08 +01:00
10 lines
325 B
TypeScript
10 lines
325 B
TypeScript
import { getServerSession } from "next-auth";
|
|
import { redirect } from "next/navigation";
|
|
import { authOptions } from "./api/auth/[...nextauth]/route";
|
|
|
|
export default async function HomePage() {
|
|
const session = await getServerSession(authOptions);
|
|
if (session?.user) redirect("/dashboard");
|
|
else redirect("/login");
|
|
}
|