rm dataProcessor from useCachedFetch hook deps

This commit is contained in:
Martti Malmi 2023-12-26 20:40:16 +02:00
parent 9fc0b676f5
commit 3af04a79cc

View File

@ -38,7 +38,7 @@ const useCachedFetch = (url, storageKey, dataProcessor = data => data) => {
if (!cachedData || (new Date().getTime() - cachedData.timestamp) / 1000 / 60 >= 15) { if (!cachedData || (new Date().getTime() - cachedData.timestamp) / 1000 / 60 >= 15) {
fetchData(); fetchData();
} }
}, [url, storageKey, dataProcessor]); }, [url, storageKey]);
return { data, isLoading, error }; return { data, isLoading, error };
}; };