Authentication And Serive Engineer Portal is added

This commit is contained in:
2026-07-18 13:44:32 +05:30
parent 3222da96ab
commit a0426e8c8a
17 changed files with 762 additions and 221 deletions

View File

@@ -0,0 +1,14 @@
"use client";
import ServiceEngineerPortal from "@/components/dashboard/serviceEngineer";
export default function EngagementDashboard() {
return (
<div className="p-6">
<ServiceEngineerPortal/>
</div>
);
}

View File

@@ -1,7 +1,17 @@
// 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 function DashboardBasePage() {
// Automatically redirect the user to the actual overview dashboard page
redirect("/dashboard/overview/dashboard");
}
export default async function DashboardBasePage() {
const session = await getServerSession(authOptions);
if (!session) {
redirect("/login");
}
else{
redirect("/dashboard/overview/dashboard");
}
}