diff options
| author | Ariel Costas Guerrero <ariel@costas.dev> | 2026-01-30 19:29:55 +0100 |
|---|---|---|
| committer | Ariel Costas Guerrero <ariel@costas.dev> | 2026-01-30 19:30:14 +0100 |
| commit | 7348781b89178589036620b33f3554b2e7271c5f (patch) | |
| tree | b465b8b1b1e10baeefbde840b4d7fd64a1aeb4a2 /src/frontend/app/components/layout/AppShell.tsx | |
| parent | 16217f0530716892abe65062e6db4092caf4a8e9 (diff) | |
feat: Enhance header and app shell with back navigation and dynamic title support
Diffstat (limited to 'src/frontend/app/components/layout/AppShell.tsx')
| -rw-r--r-- | src/frontend/app/components/layout/AppShell.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/frontend/app/components/layout/AppShell.tsx b/src/frontend/app/components/layout/AppShell.tsx index afc19f3..50f5742 100644 --- a/src/frontend/app/components/layout/AppShell.tsx +++ b/src/frontend/app/components/layout/AppShell.tsx @@ -1,5 +1,5 @@ import React, { useState } from "react"; -import { Outlet } from "react-router"; +import { Outlet, useLocation } from "react-router"; import { PageTitleProvider, usePageTitleContext, @@ -13,6 +13,7 @@ import NavBar from "./NavBar"; const AppShellContent: React.FC = () => { const { title } = usePageTitleContext(); const [isDrawerOpen, setIsDrawerOpen] = useState(false); + const location = useLocation(); return ( <div className="app-shell"> @@ -25,7 +26,7 @@ const AppShellContent: React.FC = () => { <Drawer isOpen={isDrawerOpen} onClose={() => setIsDrawerOpen(false)} /> <div className="app-shell__body"> <main className="app-shell__main"> - <Outlet /> + <Outlet key={location.pathname} /> </main> </div> <footer className="app-shell__bottom-nav"> |
