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

@ -1,6 +1,6 @@
import { colord } from 'colord';
import { BarChart } from '@/components/charts/BarChart';
import { useDateRange, useLocale, useWebsiteEventsSeries } from '@/components/hooks';
import { useDateRange, useLocale, useWebsiteEventsSeriesQuery } from '@/components/hooks';
import { renderDateLabels } from '@/lib/charts';
import { CHART_COLORS } from '@/lib/constants';
import { useMemo } from 'react';
@ -15,7 +15,7 @@ export function EventsChart({ websiteId, className }: EventsChartProps) {
dateRange: { startDate, endDate, unit, value },
} = useDateRange(websiteId);
const { locale } = useLocale();
const { data, isLoading } = useWebsiteEventsSeries(websiteId);
const { data, isLoading } = useWebsiteEventsSeriesQuery(websiteId);
const chartData = useMemo(() => {
if (!data) return [];