From 53ef1d289884ed359a74f8aabe1dd6f7f8e89835 Mon Sep 17 00:00:00 2001 From: Sir Blob <76974209+GamerBoss101@users.noreply.github.com> Date: Sun, 26 Jan 2025 03:47:29 -0500 Subject: [PATCH] more auth update --- src/app/(panels)/suite/patient/account/page.jsx | 4 ++-- src/app/(panels)/suite/patient/chat/page.jsx | 4 ++-- src/app/(panels)/suite/patient/dashboard/page.jsx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) 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"); } }