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 (