diff --git a/src/app/(panels)/suite/patient/account/page.jsx b/src/app/(panels)/suite/patient/account/page.jsx index bce6e95..9e4e5b2 100644 --- a/src/app/(panels)/suite/patient/account/page.jsx +++ b/src/app/(panels)/suite/patient/account/page.jsx @@ -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"); } } diff --git a/src/app/(panels)/suite/patient/chat/page.jsx b/src/app/(panels)/suite/patient/chat/page.jsx index 66c32c9..726270a 100644 --- a/src/app/(panels)/suite/patient/chat/page.jsx +++ b/src/app/(panels)/suite/patient/chat/page.jsx @@ -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"); } } diff --git a/src/app/(panels)/suite/patient/dashboard/page.jsx b/src/app/(panels)/suite/patient/dashboard/page.jsx index c1af4cf..06bb064 100644 --- a/src/app/(panels)/suite/patient/dashboard/page.jsx +++ b/src/app/(panels)/suite/patient/dashboard/page.jsx @@ -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"); } }