sections are paths, not a query string

The admin declares its routes in the manifest, so /fofos-admin/layout/header and
/fofos-admin/pages/home are real URLs. One reader takes the two segments after
the mount; links carry no query string at all, so nothing leaks between
sections.

What stays in the query is how you are looking — device, tab, view — rather than
at what.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-01 04:57:29 +01:00
co-authored by Claude Opus 5
parent 4d7162363b
commit a7fc07c52f
7 changed files with 141 additions and 68 deletions
+4 -5
View File
@@ -1,5 +1,5 @@
import { useSearchParams } from 'react-router';
import { DEFAULT_SECTION, isSectionKey, sectionFor } from './sections';
import { useNav } from './routes';
import { sectionFor } from './sections';
/**
* The detail panel's chrome header — the section's own name, not the word "Detail".
@@ -26,9 +26,8 @@ import { DEFAULT_SECTION, isSectionKey, sectionFor } from './sections';
* area and always reachable.
*/
export const DetailHeader = () => {
const [params] = useSearchParams();
const raw = params.get('section');
const section = sectionFor(isSectionKey(raw) ? raw : DEFAULT_SECTION);
const { section: key } = useNav();
const section = sectionFor(key);
const Icon = section.icon;
return (