Skip to content

Commit

Permalink
chore: remove changes from useGet
Browse files Browse the repository at this point in the history
  • Loading branch information
mrCherry97 committed Aug 27, 2024
1 parent 5ca0318 commit 0bf9637
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/shared/hooks/BackendAPI/useGet.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,10 @@ const useGetHook = processDataFn =>
);

useEffect(() => {
console.log(error?.code);
const receivedForbidden = error?.code === 403;

// POLLING
if (!pollingInterval || receivedForbidden || skip || error) return;
if (!pollingInterval || receivedForbidden || skip) return;
const intervalId = setInterval(refetch(true, data), pollingInterval);
return _ => clearInterval(intervalId);
}, [path, pollingInterval, data, error, skip, refetch]);
Expand Down

0 comments on commit 0bf9637

Please sign in to comment.