mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Move date range selection into redux.
This commit is contained in:
parent
d06c077019
commit
c5cb19a3bf
21 changed files with 141 additions and 138 deletions
|
|
@ -23,9 +23,9 @@ export default function useFetch(url, params = {}, options = {}) {
|
|||
|
||||
useEffect(() => {
|
||||
if (url) {
|
||||
const { interval } = options;
|
||||
const { interval, delay = 0 } = options;
|
||||
|
||||
loadData();
|
||||
setTimeout(() => loadData(), delay);
|
||||
|
||||
const id = interval ? setInterval(() => loadData(), interval) : null;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue