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