mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 09:45:04 +01:00
Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # yarn.lock
This commit is contained in:
commit
f9bf6aff2e
@ -4,17 +4,14 @@ import ReactTooltip from 'react-tooltip';
|
||||
import { ComposableMap, Geographies, Geography, ZoomableGroup } from 'react-simple-maps';
|
||||
import classNames from 'classnames';
|
||||
import tinycolor from 'tinycolor2';
|
||||
import Datamap from 'datamaps';
|
||||
import useTheme from 'hooks/useTheme';
|
||||
import { THEME_COLORS } from 'lib/constants';
|
||||
import styles from './WorldMap.module.css';
|
||||
import useCountryNames from 'hooks/useCountryNames';
|
||||
import useLocale from 'hooks/useLocale';
|
||||
import { useRouter } from 'next/router';
|
||||
|
||||
const geoUrl = '/world-110m.json';
|
||||
|
||||
function WorldMap({ data, className }) {
|
||||
const { basePath } = useRouter();
|
||||
const [tooltip, setTooltip] = useState();
|
||||
const [theme] = useTheme();
|
||||
const colors = useMemo(
|
||||
@ -60,7 +57,7 @@ function WorldMap({ data, className }) {
|
||||
>
|
||||
<ComposableMap projection="geoMercator">
|
||||
<ZoomableGroup zoom={0.8} minZoom={0.7} center={[0, 40]}>
|
||||
<Geographies geography={`${basePath}${geoUrl}`}>
|
||||
<Geographies geography={Datamap.prototype.worldTopo}>
|
||||
{({ geographies }) => {
|
||||
return geographies.map(geo => {
|
||||
const code = geo.properties.ISO_A2;
|
||||
|
@ -64,6 +64,7 @@
|
||||
"classnames": "^2.2.6",
|
||||
"cookie": "^0.4.1",
|
||||
"cors": "^2.8.5",
|
||||
"datamaps": "^0.5.9",
|
||||
"date-fns": "^2.16.1",
|
||||
"date-fns-tz": "^1.0.12",
|
||||
"detect-browser": "^5.2.0",
|
||||
|
File diff suppressed because one or more lines are too long
@ -109,6 +109,7 @@ function mockPageView(
|
||||
hostname: 'localhost',
|
||||
screen: '1680x1050',
|
||||
url: '/LOADTESTING',
|
||||
referrer: 'https://www.prisma.io',
|
||||
},
|
||||
) {
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user