fix min date chart bug when using all time

This commit is contained in:
Francis Cao 2024-11-27 10:38:45 -08:00
parent bf89dfdd49
commit c851f3bb3c
4 changed files with 19 additions and 7 deletions

View file

@ -11,7 +11,7 @@ export function WebsiteChart({
compareMode?: boolean;
}) {
const { dateRange, dateCompare } = useDateRange(websiteId);
const { startDate, endDate, unit } = dateRange;
const { startDate, endDate, unit, value } = dateRange;
const { data, isLoading } = useWebsitePageviews(websiteId, compareMode ? dateCompare : undefined);
const { pageviews, sessions, compare } = (data || {}) as any;
@ -49,6 +49,7 @@ export function WebsiteChart({
maxDate={endDate.toISOString()}
unit={unit}
isLoading={isLoading}
isAllTime={value === 'all'}
/>
);
}