spb/countryatlas
Public
TypeScript 57%
Python 38.6%
JavaScript 3.6%
CSS 0.6%
1import Link from 'next/link';2import { t } from '@/i18n';3import { WB_REGIONS } from '@/lib/regions';4import { routes } from '@/lib/site';56/** Region chips → /countries?region=… (client-side filter on the directory). */7export function RegionChips() {8 return (9 <ul className="scrollbar-none -mx-4 flex gap-2 overflow-x-auto px-4 pb-1 sm:mx-0 sm:flex-wrap sm:px-0">10 <li>11 <Link href={routes.countries()} className="inline-flex h-11 items-center whitespace-nowrap rounded-sm border border-rule px-3 text-sm text-ink md:h-9 hover:border-accent hover:text-accent">12 {t('home.explore.allCountries')}13 </Link>14 </li>15 {WB_REGIONS.map((r) => (16 <li key={r.id}>17 <Link href={`${routes.countries()}?region=${r.id}`} className="inline-flex h-11 items-center whitespace-nowrap rounded-sm border border-rule px-3 text-sm text-ink-2 md:h-9 hover:border-accent hover:text-accent">18 {r.short}19 </Link>20 </li>21 ))}22 </ul>23 );24}25