fix: improved UI

This commit is contained in:
Morten Olsen
2023-06-19 09:25:03 +02:00
parent 11299a31fa
commit 85b88822b4
28 changed files with 618 additions and 124 deletions

View File

@@ -1,4 +1,5 @@
import { useCallback, useEffect, useRef } from 'react';
import { useUpdateEffect } from '../widgets';
type AutoUpdateOptions<TReturn> = {
interval: number;
@@ -36,6 +37,10 @@ const useAutoUpdate = <T>(
};
}, [interval, actionWithCallback, callbackWithCallback]);
useUpdateEffect(async () => {
await update();
}, [update]);
return update;
};