diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx
index 42af6c7..6bf766d 100644
--- a/frontend/src/App.tsx
+++ b/frontend/src/App.tsx
@@ -8,6 +8,107 @@ import TagsPage from "./pages/TagsPage";
const APP_TITLE = "da packste dich weg";
+function Navigation() {
+ const location = useLocation();
+ const navItems = [
+ { to: "/trips", label: "Trips" },
+ { to: "/items", label: "Items" },
+ { to: "/tags", label: "Tags" },
+ ];
+ const [menuOpen, setMenuOpen] = useState(false);
+
+ const navigate = useNavigate();
+ async function goToCurrentTrip() {
+ try {
+ const id = await getNextTripId();
+ navigate(`/trips/${id}`);
+ } catch {
+ alert("Kein anstehender Trip gefunden");
+ }
+ }
+
+ const isTripDetail = /^\/trips\/[^/]+$/.test(location.pathname);
+
+ return (
+
+ );
+}
+
function NextTripRedirect({ trips }: { trips: any[] }) {
const [nextTripId, setNextTripId] = React.useState(null);
const [error, setError] = React.useState(null);
@@ -23,74 +124,6 @@ function NextTripRedirect({ trips }: { trips: any[] }) {
return ;
}
-function Navigation() {
- const location = useLocation();
- const navItems = [
- { to: "/trips", label: "Trips" },
- { to: "/items", label: "Items" },
- { to: "/tags", label: "Tags" },
- ];
-
- // Navigation für den Titel-Link
- const navigate = useNavigate();
- async function goToCurrentTrip() {
- try {
- const id = await getNextTripId();
- navigate(`/trips/${id}`);
- } catch {
- alert("Kein anstehender Trip gefunden");
- }
- }
-
- // Prüfe, ob ein einzelner Trip angezeigt wird
- const isTripDetail = /^\/trips\/[^/]+$/.test(location.pathname);
-
- return (
-
- );
-}
-
export default function App() {
const [trips, setTrips] = useState([]);
const [dbError, setDbError] = useState(null);