diff --git a/src/components/campaign/municipality/MunicipalityListPageChrome.tsx b/src/components/campaign/municipality/MunicipalityListPageChrome.tsx index 7f99e0e0..e1860d69 100644 --- a/src/components/campaign/municipality/MunicipalityListPageChrome.tsx +++ b/src/components/campaign/municipality/MunicipalityListPageChrome.tsx @@ -15,7 +15,7 @@ const IGNORED_PARAMS = ['page'] * When the current URL matches a saved municipality filter, the filter name * becomes the page subtitle (B133) — the bar keeps chips as the editable recorte. */ -export const MunicipalityListPageChrome = (): null => { +export const MunicipalityListPageChrome = () => { const savedFilters = useMunicipalitySavedFilters() const pathname = usePathname() const searchParams = useSearchParams() diff --git a/src/lib/campaignPageChrome.ts b/src/lib/campaignPageChrome.ts index 4caca490..0f7c272c 100644 --- a/src/lib/campaignPageChrome.ts +++ b/src/lib/campaignPageChrome.ts @@ -97,7 +97,9 @@ const resolveCatalogEntry = ( entry: (typeof campaignPageChromeCatalog)[keyof typeof campaignPageChromeCatalog], ): CampaignPageChrome | null => { if (!entry) return null - return { title: entry.title, subtitle: entry.subtitle } + return 'subtitle' in entry && entry.subtitle + ? { title: entry.title, subtitle: entry.subtitle } + : { title: entry.title } } const sectionOnly = (title: string): CampaignPageChrome => ({ title })