diff --git a/frontend/src/Layout.tsx b/frontend/src/Layout.tsx
index a2bee76..e1f7b82 100644
--- a/frontend/src/Layout.tsx
+++ b/frontend/src/Layout.tsx
@@ -1,7 +1,7 @@
import { useEffect, useState } from "react";
import { Link, Outlet, useLocation } from "react-router";
import { Menu, Settings } from "lucide-react";
-import { Sidebar, TabBar } from "./Nav";
+import { Sidebar, TabBar, isReady } from "./Nav";
// Tage ohne Datenverlust (fester Startpunkt, Kontinuität seit der alten
// Version).
@@ -46,9 +46,14 @@ export function Layout() {
Kontrollverlust
-
-
-
+ {/* Ohne Einstellungsrad hält ein leerer Platzhalter den Titel mittig. */}
+ {isReady("/settings") ? (
+
+
+
+ ) : (
+
+ )}
{path === "/" && (
diff --git a/frontend/src/Nav.tsx b/frontend/src/Nav.tsx
index 82018c5..35a236c 100644
--- a/frontend/src/Nav.tsx
+++ b/frontend/src/Nav.tsx
@@ -6,19 +6,26 @@ import { useAuthChanged, useMe } from "./auth";
type Target = { title: string; icon?: ReactNode; to: string; end?: boolean };
+// Bereiche, die es noch nicht gibt: Route und Platzhalter-Seite bestehen,
+// in der Navigation sind sie bis dahin ausgeblendet.
+const unfinished = new Set(["/search", "/notifications", "/chats", "/settings"]);
+
+export const isReady = (to: string) => !unfinished.has(to);
+
// useMainTargets liefert die fünf wichtigsten Ziele (TabBar, Kopf der
// Seitenleiste). Das Profil zeigt angemeldet aufs eigene Profil, sonst auf
// /me mit dem Login.
function useMainTargets(): Target[] {
const me = useMe().data;
const profile = me ? `/u/${encodeURIComponent(me.username)}` : "/me";
- return [
+ const targets: Target[] = [
{ title: "Feed", icon: , to: "/", end: true },
{ title: "Suche", icon: , to: "/search" },
{ title: "Benachrichtigungen", icon: , to: "/notifications" },
{ title: "Chats", icon: , to: "/chats" },
{ title: "Profil", icon: , to: profile },
];
+ return targets.filter((t) => isReady(t.to));
}
const moreTargets: Target[] = [
@@ -39,7 +46,7 @@ export function Sidebar({ open, onNavigate }: { open: boolean; onNavigate: () =>
const main = useMainTargets();
return (
@@ -80,7 +87,7 @@ function Logout({ onDone }: { onDone: () => void }) {
);
}
-// TabBar: mobil unten die fünf wichtigsten Ziele, nur Icons.
+// TabBar: mobil unten die (bis zu) fünf wichtigsten Ziele, nur Icons.
export function TabBar() {
return (