more auth update

This commit is contained in:
Sir Blob
2025-01-26 03:47:29 -05:00
parent fdadc4a3fa
commit 53ef1d2898
3 changed files with 6 additions and 6 deletions

View File

@@ -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");
}
}

View File

@@ -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");
}
}

View File

@@ -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");
}
}