feat/booking-panel #56
@ -23,7 +23,9 @@ export function Navbar() {
|
||||
const router = useRouter();
|
||||
const pathname = usePathname();
|
||||
const isUserDashboard = pathname?.startsWith("/user/dashboard");
|
||||
const isAdminDashboard = pathname?.startsWith("/admin/dashboard");
|
||||
const isUserSettings = pathname?.startsWith("/user/settings");
|
||||
const isAdminSettings = pathname?.startsWith("/admin/settings");
|
||||
const isUserRoute = pathname?.startsWith("/user/");
|
||||
const { isAuthenticated, logout, user, isAdmin } = useAuth();
|
||||
|
||||
@ -140,6 +142,7 @@ export function Navbar() {
|
||||
)}
|
||||
{isAuthenticated && (
|
||||
<>
|
||||
{!(isUserDashboard || isAdminDashboard || isUserSettings || isAdminSettings) && (
|
||||
<Link
|
||||
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'}`}
|
||||
@ -147,6 +150,7 @@ export function Navbar() {
|
||||
<LayoutGrid className="w-4 h-4 inline mr-1.5" />
|
||||
Dashboard
|
||||
</Link>
|
||||
)}
|
||||
<Button
|
||||
size="sm"
|
||||
variant="outline"
|
||||
@ -254,6 +258,7 @@ export function Navbar() {
|
||||
)}
|
||||
{isAuthenticated && (
|
||||
<>
|
||||
{!(isUserDashboard || isAdminDashboard || isUserSettings || isAdminSettings) && (
|
||||
<Link
|
||||
href={isAdmin ? "/admin/dashboard" : "/user/dashboard"}
|
||||
onClick={() => setMobileMenuOpen(false)}
|
||||
@ -262,6 +267,7 @@ export function Navbar() {
|
||||
<LayoutGrid className="w-4 h-4" />
|
||||
Dashboard
|
||||
</Link>
|
||||
)}
|
||||
<Button
|
||||
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"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user