From 1e6afa4c9d134bf7b756d40c742a15590b6d652b Mon Sep 17 00:00:00 2001 From: Praveen K B <30530587+praveen5959@users.noreply.github.com> Date: Thu, 14 Nov 2024 11:24:30 +0530 Subject: [PATCH] fix: useGetStreamInfo refetchOnMount API call fix (#374) --- src/hooks/useGetStreamInfo.tsx | 1 - src/pages/Stream/index.tsx | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/useGetStreamInfo.tsx b/src/hooks/useGetStreamInfo.tsx index e843df96..628ce0ad 100644 --- a/src/hooks/useGetStreamInfo.tsx +++ b/src/hooks/useGetStreamInfo.tsx @@ -20,7 +20,6 @@ export const useGetStreamInfo = (currentStream: string, initialFetch: boolean) = refetchOnWindowFocus: false, refetchOnMount: false, enabled: initialFetch, - // currentStream !== '', onSuccess: (data) => { setStreamStore((store) => setStreamInfo(store, data)); }, diff --git a/src/pages/Stream/index.tsx b/src/pages/Stream/index.tsx index 2685e5e5..e784a87b 100644 --- a/src/pages/Stream/index.tsx +++ b/src/pages/Stream/index.tsx @@ -61,6 +61,7 @@ const Stream: FC = () => { const fetchSchema = useCallback(() => { setStreamStore(streamChangeCleanup); + getStreamInfoRefetch(); refetchSchema(); }, [currentStream]);