diff --git a/site/CountriesIndexPage.tsx b/site/CountriesIndexPage.tsx index 1e2d40f09a1..7be14987236 100644 --- a/site/CountriesIndexPage.tsx +++ b/site/CountriesIndexPage.tsx @@ -2,12 +2,7 @@ import React from "react" import { Head } from "./Head.js" import { SiteHeader } from "./SiteHeader.js" import { SiteFooter } from "./SiteFooter.js" - -interface Country { - name: string - slug: string - code: string -} +import { Country, sortBy } from "@ourworldindata/utils" export const CountriesIndexPage = (props: { countries: Country[] @@ -15,6 +10,8 @@ export const CountriesIndexPage = (props: { }) => { const { countries, baseUrl } = props + const sortedCountries = sortBy(countries, (country) => country.name) + return (