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%
1014 B · 25 lines tsx
Raw Blame History
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