Renamed query hooks. Fixed conversion bugs.

This commit is contained in:
Mike Cao 2025-03-22 03:48:18 -07:00
parent adca3c36d0
commit 7886c3f393
110 changed files with 423 additions and 489 deletions

View file

@ -3,7 +3,7 @@ import { ComposableMap, Geographies, Geography, ZoomableGroup } from 'react-simp
import classNames from 'classnames';
import { colord } from 'colord';
import { ISO_COUNTRIES, MAP_FILE } from '@/lib/constants';
import { useDateRange, useTheme, useWebsiteMetrics } from '@/components/hooks';
import { useDateRange, useTheme, useWebsiteMetricsQuery } from '@/components/hooks';
import { useCountryNames } from '@/components/hooks';
import { useLocale } from '@/components/hooks';
import { useMessages } from '@/components/hooks';
@ -32,7 +32,7 @@ export function WorldMap({
const {
dateRange: { startDate, endDate },
} = useDateRange(websiteId);
const { data: mapData } = useWebsiteMetrics(websiteId, {
const { data: mapData } = useWebsiteMetricsQuery(websiteId, {
type: 'country',
startAt: +startDate,
endAt: +endDate,