From 7b909ac6a60cd2ff26ddc319fd8dfe95de772e80 Mon Sep 17 00:00:00 2001 From: Felix Zett Date: Sat, 20 Sep 2025 16:51:59 +0200 Subject: [PATCH] feat: set application title globally --- frontend/src/App.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index f356050..346a809 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -6,6 +6,8 @@ import TripChecklist from "./pages/TripChecklist"; import TripsPage from "./pages/TripsPage"; import TagsPage from "./pages/TagsPage"; +const APP_TITLE = "da packste dich weg"; + function NextTripRedirect({ trips }: { trips: any[] }) { const [nextTripId, setNextTripId] = React.useState(null); const [error, setError] = React.useState(null); @@ -51,7 +53,7 @@ function Navigation() { onClick={goToCurrentTrip} title="Zum aktuellen Trip" > - Packliste + {APP_TITLE} {navItems.map((item) => { // Trips ist NICHT aktiv, wenn ein einzelner Trip angezeigt wird @@ -108,6 +110,10 @@ export default function App() { loadTrips(); }, []); + useEffect(() => { + document.title = APP_TITLE; + }, []); + async function goToCurrentTrip() { try { const id = await getNextTripId();