Separated query string date handling. Fixed all time date.

This commit is contained in:
Mike Cao 2025-10-03 01:19:35 -07:00
parent 1def80ba42
commit b36cd48b4a
7 changed files with 86 additions and 66 deletions

View file

@ -15,7 +15,7 @@ export function WebsiteChart({
const { startDate, endDate, unit, value } = dateRange;
const { data, isLoading, isFetching, error } = useWebsitePageviewsQuery({
websiteId,
compare: compareMode ? dateCompare : undefined,
compare: compareMode ? dateCompare?.['value'] : undefined,
});
const { pageviews, sessions, compare } = (data || {}) as any;