more auth update
This commit is contained in:
@@ -22,8 +22,8 @@ const AccountPage = () => {
|
|||||||
}, [user]);
|
}, [user]);
|
||||||
|
|
||||||
if (userData) {
|
if (userData) {
|
||||||
if (userData.role !== "doctor") {
|
if (userData.role !== "patient") {
|
||||||
router.push("/suite/patient/dashboard");
|
router.push("/suite/doctor/dashboard");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ export default function Chat() {
|
|||||||
}, [user]);
|
}, [user]);
|
||||||
|
|
||||||
if (userData) {
|
if (userData) {
|
||||||
if (userData.role !== "doctor") {
|
if (userData.role !== "patient") {
|
||||||
router.push("/suite/patient/dashboard");
|
router.push("/suite/doctor/dashboard");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ export default function Dashboard() {
|
|||||||
}, [user]);
|
}, [user]);
|
||||||
|
|
||||||
if (userData) {
|
if (userData) {
|
||||||
if (userData.role !== "doctor") {
|
if (userData.role !== "patient") {
|
||||||
router.push("/suite/patient/dashboard");
|
router.push("/suite/doctor/dashboard");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user