Added country flags.

This commit is contained in:
Mike Cao 2023-04-23 19:52:44 -07:00
parent c5bffb97cc
commit 4a51a5db3f
258 changed files with 16 additions and 9 deletions

View file

@ -15,11 +15,11 @@ export function RegionsTable({ websiteId, ...props }) {
return regions[x] ? `${regions[x]}, ${countryNames[x.split('-')[0]]}` : x;
};
const renderLink = ({ x }) => {
const renderLink = ({ x: code }) => {
return (
<div className={locale}>
<FilterLink id="region" value={x} label={renderLabel(x)} />
</div>
<FilterLink id="region" className={locale} value={code} label={renderLabel(code)}>
<img src={`/images/flags/${code.split('-')[0].toLowerCase()}.png`} alt={code} />
</FilterLink>
);
};