Merge pull request 'feat/booking-panel' (#56) from feat/booking-panel into master
Reviewed-on: http://35.207.46.142/ATTUNE-HEART-THERAPY/website/pulls/56
This commit is contained in:
commit
55ef70fabc
@ -23,7 +23,10 @@ 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();
|
||||||
|
|
||||||
@ -140,13 +143,15 @@ export function Navbar() {
|
|||||||
)}
|
)}
|
||||||
{isAuthenticated && (
|
{isAuthenticated && (
|
||||||
<>
|
<>
|
||||||
<Link
|
{!(isUserDashboard || isAdminDashboard || isUserSettings || isAdminSettings || isUserAppointmentDetails) && (
|
||||||
href={isAdmin ? "/admin/dashboard" : "/user/dashboard"}
|
<Link
|
||||||
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'}`}
|
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'}`}
|
||||||
<LayoutGrid className="w-4 h-4 inline mr-1.5" />
|
>
|
||||||
Dashboard
|
<LayoutGrid className="w-4 h-4 inline mr-1.5" />
|
||||||
</Link>
|
Dashboard
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
<Button
|
<Button
|
||||||
size="sm"
|
size="sm"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
@ -254,14 +259,16 @@ export function Navbar() {
|
|||||||
)}
|
)}
|
||||||
{isAuthenticated && (
|
{isAuthenticated && (
|
||||||
<>
|
<>
|
||||||
<Link
|
{!(isUserDashboard || isAdminDashboard || isUserSettings || isAdminSettings || isUserAppointmentDetails) && (
|
||||||
href={isAdmin ? "/admin/dashboard" : "/user/dashboard"}
|
<Link
|
||||||
onClick={() => setMobileMenuOpen(false)}
|
href={isAdmin ? "/admin/dashboard" : "/user/dashboard"}
|
||||||
className={`text-left text-sm sm:text-base font-medium py-2.5 sm:py-3 px-3 sm:px-4 rounded-lg transition-colors flex items-center gap-2 ${isDark ? 'text-gray-300 hover:bg-gray-800' : 'text-gray-700 hover:bg-gray-100'}`}
|
onClick={() => setMobileMenuOpen(false)}
|
||||||
>
|
className={`text-left text-sm sm:text-base font-medium py-2.5 sm:py-3 px-3 sm:px-4 rounded-lg transition-colors flex items-center gap-2 ${isDark ? 'text-gray-300 hover:bg-gray-800' : 'text-gray-700 hover:bg-gray-100'}`}
|
||||||
<LayoutGrid className="w-4 h-4" />
|
>
|
||||||
Dashboard
|
<LayoutGrid className="w-4 h-4" />
|
||||||
</Link>
|
Dashboard
|
||||||
|
</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