Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: repoint the HivesPage comments at HivesCard and pin the nav filter and lazy roster

This commit is contained in:
iris 2026-10-26 16:51:14 +01:00 • committed by mara
commit 209a286d7c
13 changed files with 63 additions and 18 deletions

View file

@ -15,3 +15,15 @@ const FULL_BLEED_ROUTE_PATTERN =
export function isFullBleedRoute(location: string): boolean {
return location === "/" || FULL_BLEED_ROUTE_PATTERN.test(location);
}
// Routes that only a developer needs. "hide developer details" takes their
// tabs out of the nav; the pages themselves still answer at their paths.
const DEVELOPER_ROUTES = ["/components"];
export function visibleNavItems<T extends { href: string }>(
items: readonly T[],
hideDeveloper: boolean,
): readonly T[] {
if (!hideDeveloper) return items;
return items.filter((item) => !DEVELOPER_ROUTES.includes(item.href));
}