SPB Git forge

spb/countryatlas

Public
20commits 1branches 0releases
268.3 MBsize
maindefault branch
12 days agolast push
TypeScript 57% Python 38.6% JavaScript 3.6% CSS 0.6%
583 B · 11 lines tsx
Raw Blame History
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