feat: set application title globally

This commit is contained in:
Felix Zett 2025-09-20 16:51:59 +02:00
parent 8c5fefc282
commit 7b909ac6a6

View file

@ -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<string | null>(null);
const [error, setError] = React.useState<string | null>(null);
@ -51,7 +53,7 @@ function Navigation() {
onClick={goToCurrentTrip}
title="Zum aktuellen Trip"
>
Packliste
{APP_TITLE}
</button>
{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();