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%
731 B · 19 lines typescript
Raw Blame History
1/** Server-safe indicator option shape for pickers (no 'use client'); re-exported by components/controls/indicator-select.tsx. */2import type { IndicatorSummary } from './types';34export interface IndicatorOption {5  slug: string;6  name: string;7  short_name?: string | null;8  topic?: string | null;9  unit?: string | null;10  featured?: boolean | null;11  first_year?: number | null;12  last_year?: number | null;13  n_countries?: number | null;14}1516export function toIndicatorOption(i: IndicatorSummary): IndicatorOption {17  return { slug: i.slug, name: i.name ?? i.slug, short_name: i.short_name, topic: i.topic, unit: i.unit, featured: i.featured, first_year: i.first_year, last_year: i.last_year, n_countries: i.n_countries };18}19