Files
KAFM-Project/app/dashboard/page.tsx

17 lines
439 B
TypeScript

// app/dashboard/page.tsx
import { redirect } from "next/navigation";
import { getServerSession } from "next-auth/next";
import { authOptions } from "@/app/api/auth/[...nextauth]/route"; // Changed from handler to authOptions
export default async function DashboardBasePage() {
const session = await getServerSession(authOptions);
if (!session) {
redirect("/login");
}
else{
redirect("/dashboard/overview/dashboard");
}
}