fix(campanha): B133 typecheck — optional catalog subtitle + chrome component return

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
This commit is contained in:
Cursor Agent 2026-08-02 21:17:48 +00:00
parent f89fc4b81f
commit 6cc17f0d4e
No known key found for this signature in database
2 changed files with 4 additions and 2 deletions

View file

@ -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()

View file

@ -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 })