From 6cc17f0d4e7747aad682dc61dc4cbc2576144b6b Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 2 Aug 2026 21:17:48 +0000 Subject: [PATCH] =?UTF-8?q?fix(campanha):=20B133=20typecheck=20=E2=80=94?= =?UTF-8?q?=20optional=20catalog=20subtitle=20+=20chrome=20component=20ret?= =?UTF-8?q?urn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Francisco Solla --- .../campaign/municipality/MunicipalityListPageChrome.tsx | 2 +- src/lib/campaignPageChrome.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) 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 })