This commit is contained in:
Sir Blob
2025-01-26 03:07:45 -05:00
parent a1df31e142
commit 2ff00fed71

View File

@@ -22,9 +22,11 @@ export default function RootLayout({
}, [user]);
if (userData) {
console.log(userData);
if (userData.role === "caregiver" && router.pathname.startsWith("/suite/patient/")) {
router.push("/suite/doctor/dashboard");
}
if (userData.role === "patient" && router.pathname.startsWith("/suite/doctor/")) {
router.push("/suite/patient/dashboard");
}