We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 743eee0 commit 63e23afCopy full SHA for 63e23af
1 file changed
src/components/Actions/index.tsx
@@ -55,9 +55,18 @@ export function Actions() {
55
}, []);
56
57
useEffect(() => {
58
- (async () => {
59
- setUpdatesAvailable(await checkUpdates());
60
- })();
+ const checkForUpdates = async () => {
+ const canUpdate = await checkUpdates();
+ if (canUpdate) {
61
+ setUpdatesAvailable(true);
62
+ } else {
63
+ setTimeout(() => {
64
+ checkForUpdates();
65
+ }, 2000);
66
+ }
67
68
+
69
70
71
72
return (<>
0 commit comments