Skip to content

Commit

Permalink
fix:missing query params
Browse files Browse the repository at this point in the history
  • Loading branch information
Koustavd18 committed Jan 10, 2025
1 parent 07b121b commit 15fc32e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pages/Stream/Views/Explore/useLogsFetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import { useLogsStore, logsStoreReducers } from '../../providers/LogsProvider';
import { useQueryLogs } from '@/hooks/useQueryLogs';
import { useFetchCount } from '@/hooks/useQueryResult';
import { useStreamStore } from '../../providers/StreamProvider';
import useParamsController from '@/pages/Stream/hooks/useParamsController';
import _ from 'lodash';

const { setCleanStoreForStreamChange } = logsStoreReducers;
const { syncTimeRange } = appStoreReducers;

const useLogsFetcher = (props: { schemaLoading: boolean; infoLoading: boolean }) => {
const { isStoreSynced } = useParamsController();
const { schemaLoading, infoLoading } = props;
const [currentStream] = useAppStore((store) => store.currentStream);
const [{ timeRange }, setAppStore] = useAppStore((store) => store);
Expand All @@ -25,6 +27,7 @@ const useLogsFetcher = (props: { schemaLoading: boolean; infoLoading: boolean })
const showTable = hasContentLoaded && !hasNoData && !queryLogsError;

useEffect(() => {
if (!isStoreSynced) return;
setAppStore(syncTimeRange);
setLogsStore(setCleanStoreForStreamChange);
}, [currentStream]);
Expand Down

0 comments on commit 15fc32e

Please sign in to comment.