Skip to content

Commit ea8252f

Browse files
authored
remove redundant alerts api call (#440)
1 parent 55c963c commit ea8252f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/hooks/useAlertsEditor.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ import { AxiosError, isAxiosError } from 'axios';
55
import { useStreamStore, streamStoreReducers } from '@/pages/Stream/providers/StreamProvider';
66
const { setAlertsConfig } = streamStoreReducers;
77

8-
const useAlertsQuery = (streamName: string, hasAlertsAccess: boolean, isStandAloneMode: boolean | null) => {
8+
const useAlertsQuery = (streamName: string, hasAlertsAccess: boolean, _isStandAloneMode: boolean | null) => {
99
const [, setStreamStore] = useStreamStore(() => null);
1010
const { data, isError, isSuccess, isLoading, refetch } = useQuery(
1111
['fetch-log-stream-alert', streamName, hasAlertsAccess],
1212
() => getLogStreamAlerts(streamName),
1313
{
1414
retry: false,
15-
enabled: streamName !== '' && hasAlertsAccess && !!isStandAloneMode,
15+
enabled: false,
1616
refetchOnWindowFocus: false,
1717
onSuccess: (data) => {
1818
setStreamStore((store) => setAlertsConfig(store, data));

0 commit comments

Comments
 (0)