From 69c3d0d57499f0cbd0495fea59d7c655652031ef Mon Sep 17 00:00:00 2001 From: Sir Blob <76974209+GamerBoss101@users.noreply.github.com> Date: Sun, 26 Jan 2025 03:37:02 -0500 Subject: [PATCH] auth more stuff --- src/app/(panels)/suite/doctor/account/page.jsx | 4 ---- src/app/(panels)/suite/doctor/dashboard/page.jsx | 4 +--- src/app/(panels)/suite/patient/account/page.jsx | 6 ++---- src/app/(panels)/suite/patient/chat/page.jsx | 6 ++---- src/app/(panels)/suite/patient/dashboard/page.jsx | 4 +--- 5 files changed, 6 insertions(+), 18 deletions(-) diff --git a/src/app/(panels)/suite/doctor/account/page.jsx b/src/app/(panels)/suite/doctor/account/page.jsx index 1d24a5a..7252897 100644 --- a/src/app/(panels)/suite/doctor/account/page.jsx +++ b/src/app/(panels)/suite/doctor/account/page.jsx @@ -43,10 +43,6 @@ const AccountPage = () => { } }; - if (!userData) { - router.push('/'); - } - return (
diff --git a/src/app/(panels)/suite/doctor/dashboard/page.jsx b/src/app/(panels)/suite/doctor/dashboard/page.jsx index 8ec6d5e..efb2d5e 100644 --- a/src/app/(panels)/suite/doctor/dashboard/page.jsx +++ b/src/app/(panels)/suite/doctor/dashboard/page.jsx @@ -26,9 +26,7 @@ export default function Dashboard() { if (userData.role !== "doctor") { router.push("/suite/patient/dashboard"); } - } else { - router.push("/"); - } + } const patients = [ { id: 1, name: "John Doe", age: 30, lastVisit: "2024-10-01" }, diff --git a/src/app/(panels)/suite/patient/account/page.jsx b/src/app/(panels)/suite/patient/account/page.jsx index a435b98..7faa65f 100644 --- a/src/app/(panels)/suite/patient/account/page.jsx +++ b/src/app/(panels)/suite/patient/account/page.jsx @@ -23,10 +23,8 @@ const AccountPage = () => { if (userData.role !== "doctor") { router.push("/suite/patient/dashboard"); } - } else { - router.push("/"); - } - + } + return (
diff --git a/src/app/(panels)/suite/patient/chat/page.jsx b/src/app/(panels)/suite/patient/chat/page.jsx index 0ebf208..66c32c9 100644 --- a/src/app/(panels)/suite/patient/chat/page.jsx +++ b/src/app/(panels)/suite/patient/chat/page.jsx @@ -31,10 +31,8 @@ export default function Chat() { if (userData.role !== "doctor") { router.push("/suite/patient/dashboard"); } - } else { - router.push("/"); - } - + } + return (
diff --git a/src/app/(panels)/suite/patient/dashboard/page.jsx b/src/app/(panels)/suite/patient/dashboard/page.jsx index 2a11161..c1af4cf 100644 --- a/src/app/(panels)/suite/patient/dashboard/page.jsx +++ b/src/app/(panels)/suite/patient/dashboard/page.jsx @@ -26,9 +26,7 @@ export default function Dashboard() { if (userData.role !== "doctor") { router.push("/suite/patient/dashboard"); } - } else { - router.push("/"); - } + } return (