// 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"); } }