Added search to metrics table.

This commit is contained in:
Mike Cao 2023-12-10 02:02:24 -08:00
parent 3a28fea8ac
commit cad719fd23
12 changed files with 111 additions and 60 deletions

View file

@ -11,8 +11,8 @@ export function CitiesTable(props: MetricsTableProps) {
const countryNames = useCountryNames(locale);
const renderLabel = (city: string, country: string) => {
const name = countryNames[country];
return name ? `${city}, ${name}` : city;
const countryName = countryNames[country];
return countryName ? `${city}, ${countryName}` : city;
};
const renderLink = ({ x: city, country }) => {