feat: set application title globally
This commit is contained in:
parent
8c5fefc282
commit
7b909ac6a6
1 changed files with 7 additions and 1 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue