Skip to content

Commit 1e12bf6

Browse files
Merge branch 'master' into release-config
2 parents bee94a5 + b625f64 commit 1e12bf6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

client/src/components/sidebar/update-warning.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const UpdateWarning = () => {
88
const [update, setUpdate] = React.useState<undefined | { latest: string }>(undefined)
99

1010
useEffect(() => {
11-
const interval = setInterval(() => {
11+
const fetchVersion = () => {
1212
if (!nativeAPI) return
1313
nativeAPI
1414
.getServerVersion(`${BATTLECODE_YEAR % 100}`)
@@ -18,7 +18,10 @@ export const UpdateWarning = () => {
1818
}
1919
})
2020
.catch(() => {})
21-
}, 1000 * 60 * UPDATE_CHECK_MINUTES)
21+
}
22+
23+
fetchVersion()
24+
const interval = setInterval(fetchVersion, 1000 * 60 * UPDATE_CHECK_MINUTES)
2225

2326
return () => clearInterval(interval)
2427
}, [])

0 commit comments

Comments
 (0)