mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 23:57:12 +01:00
Added country flags.
This commit is contained in:
parent
c5bffb97cc
commit
4a51a5db3f
258 changed files with 16 additions and 9 deletions
|
|
@ -11,9 +11,14 @@ export function CountriesTable({ websiteId, ...props }) {
|
|||
|
||||
function renderLink({ x: code }) {
|
||||
return (
|
||||
<div className={locale}>
|
||||
<FilterLink id="country" value={countryNames[code] && code} label={countryNames[code]} />
|
||||
</div>
|
||||
<FilterLink
|
||||
id="country"
|
||||
className={locale}
|
||||
value={countryNames[code] && code}
|
||||
label={countryNames[code]}
|
||||
>
|
||||
<img src={`/images/flags/${code.toLowerCase()}.png`} alt={code} />
|
||||
</FilterLink>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue