mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-15 18:53:06 +00:00
- Restore B117 home search: scopeMunicipalities, merge prefix, session prompt - Shared useNearestMunicipalitySlug (B14 key) for busca geral + wizard - Wizard merge uses geoSlug only — no Perto de você / km copy on rows - Impl plan: docs/plans/municipio-geo-topo-sugestoes-busca-impl.md Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
14 lines
523 B
TypeScript
14 lines
523 B
TypeScript
'use client'
|
|
|
|
import type { AccessibleMunicipality } from '@/lib/municipalityProximity'
|
|
|
|
import { useNearestMunicipalitySlug } from '@/components/campaign/shared/useNearestMunicipalitySlug'
|
|
|
|
/**
|
|
* B117 / B125 — nearest in-scope município slug for global search suggest.
|
|
* Reuses shared prompt + resolve hook (B14 session key).
|
|
*/
|
|
export const useHomeSearchNearestMunicipality = (
|
|
accessible: readonly AccessibleMunicipality[],
|
|
enabled: boolean,
|
|
): string | null => useNearestMunicipalitySlug(accessible, enabled)
|