mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Fixed country lookup.
This commit is contained in:
parent
f9bf6aff2e
commit
c5341e605b
3 changed files with 531 additions and 14 deletions
|
|
@ -6,7 +6,7 @@ import classNames from 'classnames';
|
|||
import tinycolor from 'tinycolor2';
|
||||
import Datamap from 'datamaps';
|
||||
import useTheme from 'hooks/useTheme';
|
||||
import { THEME_COLORS } from 'lib/constants';
|
||||
import { ISO_COUNTRIES, THEME_COLORS } from 'lib/constants';
|
||||
import styles from './WorldMap.module.css';
|
||||
import useCountryNames from 'hooks/useCountryNames';
|
||||
import useLocale from 'hooks/useLocale';
|
||||
|
|
@ -60,7 +60,7 @@ function WorldMap({ data, className }) {
|
|||
<Geographies geography={Datamap.prototype.worldTopo}>
|
||||
{({ geographies }) => {
|
||||
return geographies.map(geo => {
|
||||
const code = geo.properties.ISO_A2;
|
||||
const code = ISO_COUNTRIES[geo.id];
|
||||
|
||||
return (
|
||||
<Geography
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue