created different file for the routes, and changes all the import

This commit is contained in:
sumona-banerjeee committed 2026-04-29 11:43:54 +05:30
1 parent 73b31778db
commit 45444ba8bd
4 files changed
+16 -6

No files matched your search

+5 -2
View File
@@ -14,6 +14,7 @@ import {
XCircle,
LayoutDashboard,
} from "lucide-react";
import { ROUTES } from "@/lib/routes";
type FilterStatus = "All" | "Pending" | "Approved" | "Rejected";
@@ -32,8 +33,10 @@ export default function ManagerPage() {
}, []);
useEffect(() => {
if (!isLoading && !user) router.replace("/");
else if (!isLoading && user?.role === "employee") router.replace("/employee");
// if (!isLoading && !user) router.replace("/");
// else if (!isLoading && user?.role === "employee") router.replace("/employee");
if (!isLoading && !user) router.replace(ROUTES.home);
else if (!isLoading && user?.role === "employee") router.replace(ROUTES.employee);
else if (!isLoading && user) loadData();
}, [user, isLoading, router, loadData]);