diff --git a/apps/frontend/src/routes/admin/AdminLayout.tsx b/apps/frontend/src/routes/admin/AdminLayout.tsx index 33f477d..919675a 100644 --- a/apps/frontend/src/routes/admin/AdminLayout.tsx +++ b/apps/frontend/src/routes/admin/AdminLayout.tsx @@ -1,3 +1,4 @@ +import { useEffect, useState } from "react"; import { Link, Outlet, useRouterState } from "@tanstack/react-router"; const NAV_ITEMS = [ @@ -13,17 +14,65 @@ const NAV_ITEMS = [ export function AdminLayout() { const pathname = useRouterState({ select: (s) => s.location.pathname }); + const [mobileOpen, setMobileOpen] = useState(false); + + // Drawer schließen, wenn per Navigation die Seite wechselt + useEffect(() => { + setMobileOpen(false); + }, [pathname]); return ( -
- -
+
diff --git a/apps/frontend/src/routes/admin/CategoriesPage.tsx b/apps/frontend/src/routes/admin/CategoriesPage.tsx index bbcfa4f..3330ae5 100644 --- a/apps/frontend/src/routes/admin/CategoriesPage.tsx +++ b/apps/frontend/src/routes/admin/CategoriesPage.tsx @@ -196,7 +196,7 @@ export function CategoriesPage() { description="Per Drag & Drop sortieren. Favoriten erscheinen in der Suche trotzdem immer zuerst." /> -
+
diff --git a/apps/frontend/src/routes/admin/DevicesPage.tsx b/apps/frontend/src/routes/admin/DevicesPage.tsx index a85c570..3aee062 100644 --- a/apps/frontend/src/routes/admin/DevicesPage.tsx +++ b/apps/frontend/src/routes/admin/DevicesPage.tsx @@ -134,7 +134,7 @@ function AddDeviceForm() { } return ( - +
) : (

diff --git a/apps/frontend/src/routes/admin/ServicesPage.tsx b/apps/frontend/src/routes/admin/ServicesPage.tsx index 0a31a97..a6082ff 100644 --- a/apps/frontend/src/routes/admin/ServicesPage.tsx +++ b/apps/frontend/src/routes/admin/ServicesPage.tsx @@ -188,24 +188,26 @@ export function ServicesPage() {

Dienste konnten nicht geladen werden.

) : services && services.length > 0 ? (
- - - - - - - - - - - {services.map((service) => ( - - ))} - -
- DienstKategorieAliasURL -
+
+ + + + + + + + + + + {services.map((service) => ( + + ))} + +
+ DienstKategorieAliasURL +
+
) : (