forked from Kieran/snort
rm dataProcessor from useCachedFetch hook deps
This commit is contained in:
parent
9fc0b676f5
commit
3af04a79cc
@ -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 };
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user