log data
This commit is contained in:
1 parent
a1df31e142
commit
2ff00fed71
1 file changed
+2
@@ -22,9 +22,11 @@ export default function RootLayout({
|
|||||||
}, [user]);
|
}, [user]);
|
||||||
|
|
||||||
if (userData) {
|
if (userData) {
|
||||||
|
console.log(userData);
|
||||||
if (userData.role === "caregiver" && router.pathname.startsWith("/suite/patient/")) {
|
if (userData.role === "caregiver" && router.pathname.startsWith("/suite/patient/")) {
|
||||||
router.push("/suite/doctor/dashboard");
|
router.push("/suite/doctor/dashboard");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (userData.role === "patient" && router.pathname.startsWith("/suite/doctor/")) {
|
if (userData.role === "patient" && router.pathname.startsWith("/suite/doctor/")) {
|
||||||
router.push("/suite/patient/dashboard");
|
router.push("/suite/patient/dashboard");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user