diff --git a/src/components/CountryList/CountryList.tsx b/src/components/CountryList/CountryList.tsx index 5db73c650..a47bf996c 100644 --- a/src/components/CountryList/CountryList.tsx +++ b/src/components/CountryList/CountryList.tsx @@ -89,6 +89,10 @@ const CountryList: React.FC = props => { const [isCollapsed, setCollapseStatus] = React.useState(true); const toggleCollapse = () => setCollapseStatus(!isCollapsed); + function sortCountries(countries: CountryFragment[]): CountryFragment[] { + return [...countries].sort((a, b) => a.country.localeCompare(b.country)); + } + return ( = props => { {!isCollapsed && renderCollection( - countries, + sortCountries(countries), (country, countryIndex) => (