spb/countryatlas
Public
TypeScript 57%
Python 38.6%
JavaScript 3.6%
CSS 0.6%
1'use client';2import { useRouter } from 'next/navigation';3import { routes } from '@/lib/site';4import { EntityPicker } from './entity-picker';56/** EntityPicker that navigates to the picked country / indicator page. */7export function EntityPickerNav({ type, placeholder, className }: { type: 'country' | 'indicator'; placeholder: string; className?: string }) {8 const router = useRouter();9 return <EntityPicker type={type} placeholder={placeholder} className={className} onPick={(e) => router.push(type === 'country' ? routes.country(e.slug) : routes.indicator(e.slug))} />;10}11