mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 06:37:18 +01:00
fix chart and timezone issues, pass consistent dates to DB.
Closes #3700
This commit is contained in:
parent
81bedec6d5
commit
6751bf88bb
10 changed files with 157 additions and 79 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { LoadingPanel } from '@/components/common/LoadingPanel';
|
||||
import { useDateRange } from '@/components/hooks';
|
||||
import { useDateRange, useTimezone } from '@/components/hooks';
|
||||
import { useWebsitePageviewsQuery } from '@/components/hooks/queries/useWebsitePageviewsQuery';
|
||||
import { PageviewsChart } from '@/components/metrics/PageviewsChart';
|
||||
import { useMemo } from 'react';
|
||||
|
|
@ -11,7 +11,8 @@ export function WebsiteChart({
|
|||
websiteId: string;
|
||||
compareMode?: boolean;
|
||||
}) {
|
||||
const { dateRange, dateCompare } = useDateRange();
|
||||
const { timezone } = useTimezone();
|
||||
const { dateRange, dateCompare } = useDateRange({ timezone: timezone });
|
||||
const { startDate, endDate, unit, value } = dateRange;
|
||||
const { data, isLoading, isFetching, error } = useWebsitePageviewsQuery({
|
||||
websiteId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue