mirror of
https://github.com/umami-software/umami.git
synced 2026-02-06 13:47:15 +01:00
remove timezone from realtime. Closes #3700
This commit is contained in:
parent
14f5babea7
commit
30781430c5
5 changed files with 6 additions and 14 deletions
|
|
@ -1,4 +1,3 @@
|
|||
import { useTimezone } from '@/components/hooks/useTimezone';
|
||||
import { REALTIME_INTERVAL } from '@/lib/constants';
|
||||
import { useApi } from '../useApi';
|
||||
|
||||
|
|
@ -24,11 +23,10 @@ export interface RealtimeData {
|
|||
|
||||
export function useRealtimeQuery(websiteId: string) {
|
||||
const { get, useQuery } = useApi();
|
||||
const { timezone } = useTimezone();
|
||||
const { data, isLoading, error } = useQuery<RealtimeData>({
|
||||
queryKey: ['realtime', { websiteId, timezone }],
|
||||
queryKey: ['realtime', { websiteId }],
|
||||
queryFn: async () => {
|
||||
return get(`/realtime/${websiteId}`, { timezone });
|
||||
return get(`/realtime/${websiteId}`);
|
||||
},
|
||||
enabled: !!websiteId,
|
||||
refetchInterval: REALTIME_INTERVAL,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue