mirror of
https://github.com/umami-software/umami.git
synced 2026-02-06 05:37:20 +01:00
Fix issues with basePath.
This commit is contained in:
parent
1e8c1d0d18
commit
339cd21596
15 changed files with 66 additions and 51 deletions
|
|
@ -8,10 +8,12 @@ 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';
|
||||
|
||||
export default function WorldMap({ data, className }) {
|
||||
const { basePath } = useRouter();
|
||||
const [tooltip, setTooltip] = useState();
|
||||
const [theme] = useTheme();
|
||||
const colors = useMemo(
|
||||
|
|
@ -57,7 +59,7 @@ export default function WorldMap({ data, className }) {
|
|||
>
|
||||
<ComposableMap projection="geoMercator">
|
||||
<ZoomableGroup zoom={0.8} minZoom={0.7} center={[0, 40]}>
|
||||
<Geographies geography={geoUrl}>
|
||||
<Geographies geography={`${basePath}${geoUrl}`}>
|
||||
{({ geographies }) => {
|
||||
return geographies.map(geo => {
|
||||
const code = geo.properties.ISO_A2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue