Compare commits
No commits in common. "55ef70fabc82b1f922a61ba3f6969701b0b7fd7f" and "f04c8179511ff5c4c2c91d2bb5a04fa0e99938ff" have entirely different histories.
55ef70fabc
...
f04c817951
@ -23,10 +23,7 @@ export function Navbar() {
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
const isUserDashboard = pathname?.startsWith("/user/dashboard");
|
const isUserDashboard = pathname?.startsWith("/user/dashboard");
|
||||||
const isAdminDashboard = pathname?.startsWith("/admin/dashboard");
|
|
||||||
const isUserSettings = pathname?.startsWith("/user/settings");
|
const isUserSettings = pathname?.startsWith("/user/settings");
|
||||||
const isAdminSettings = pathname?.startsWith("/admin/settings");
|
|
||||||
const isUserAppointmentDetails = pathname?.startsWith("/user/appointments/");
|
|
||||||
const isUserRoute = pathname?.startsWith("/user/");
|
const isUserRoute = pathname?.startsWith("/user/");
|
||||||
const { isAuthenticated, logout, user, isAdmin } = useAuth();
|
const { isAuthenticated, logout, user, isAdmin } = useAuth();
|
||||||
|
|
||||||
@ -143,7 +140,6 @@ export function Navbar() {
|
|||||||
)}
|
)}
|
||||||
{isAuthenticated && (
|
{isAuthenticated && (
|
||||||
<>
|
<>
|
||||||
{!(isUserDashboard || isAdminDashboard || isUserSettings || isAdminSettings || isUserAppointmentDetails) && (
|
|
||||||
<Link
|
<Link
|
||||||
href={isAdmin ? "/admin/dashboard" : "/user/dashboard"}
|
href={isAdmin ? "/admin/dashboard" : "/user/dashboard"}
|
||||||
className={`text-sm font-medium transition-colors cursor-pointer px-3 py-2 rounded-lg hover:opacity-90 ${isDark ? 'text-gray-300 hover:text-white' : 'text-gray-700 hover:text-rose-600'}`}
|
className={`text-sm font-medium transition-colors cursor-pointer px-3 py-2 rounded-lg hover:opacity-90 ${isDark ? 'text-gray-300 hover:text-white' : 'text-gray-700 hover:text-rose-600'}`}
|
||||||
@ -151,7 +147,6 @@ export function Navbar() {
|
|||||||
<LayoutGrid className="w-4 h-4 inline mr-1.5" />
|
<LayoutGrid className="w-4 h-4 inline mr-1.5" />
|
||||||
Dashboard
|
Dashboard
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
|
||||||
<Button
|
<Button
|
||||||
size="sm"
|
size="sm"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
@ -259,7 +254,6 @@ export function Navbar() {
|
|||||||
)}
|
)}
|
||||||
{isAuthenticated && (
|
{isAuthenticated && (
|
||||||
<>
|
<>
|
||||||
{!(isUserDashboard || isAdminDashboard || isUserSettings || isAdminSettings || isUserAppointmentDetails) && (
|
|
||||||
<Link
|
<Link
|
||||||
href={isAdmin ? "/admin/dashboard" : "/user/dashboard"}
|
href={isAdmin ? "/admin/dashboard" : "/user/dashboard"}
|
||||||
onClick={() => setMobileMenuOpen(false)}
|
onClick={() => setMobileMenuOpen(false)}
|
||||||
@ -268,7 +262,6 @@ export function Navbar() {
|
|||||||
<LayoutGrid className="w-4 h-4" />
|
<LayoutGrid className="w-4 h-4" />
|
||||||
Dashboard
|
Dashboard
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
className="w-full justify-start text-sm sm:text-base bg-red-600 hover:bg-red-700 text-white border-red-600 hover:border-red-700"
|
className="w-full justify-start text-sm sm:text-base bg-red-600 hover:bg-red-700 text-white border-red-600 hover:border-red-700"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user