diff --git a/src/App.tsx b/src/App.tsx index 7ed6e4d..6394255 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -38,6 +38,23 @@ export default function App() { }); }, []); + // Dynamisch den Dokumententitel (Browsertab-Titel) basierend auf Pfad und Autorendaten anpassen + useEffect(() => { + if (!authorData) { + document.title = "Lade Autoren-Portfolio..."; + return; + } + if (currentPath === "/admin" || currentPath.startsWith("/admin/")) { + document.title = "Admin-Zentrale | Autor-Suiten"; + } else if (currentPath === "/sensual-moments" || currentPath.startsWith("/sensual-moments/")) { + document.title = authorData.erotica.name || "Marc Velvet"; + } else if (currentPath === "/clara-finch" || currentPath.startsWith("/clara-finch/")) { + document.title = authorData.clara.name || "Clara Finch"; + } else { + document.title = authorData.scifi.name || "Daniel Hesse"; + } + }, [currentPath, authorData]); + const handleAdminLogout = () => { // Relocate to landing site after administration work window.history.pushState({}, "", "/");