Skip to content

Commit

Permalink
Merge branch 'master' into release-config
Browse files Browse the repository at this point in the history
  • Loading branch information
TheApplePieGod committed Jan 14, 2024
2 parents bee94a5 + b625f64 commit 1e12bf6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions client/src/components/sidebar/update-warning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const UpdateWarning = () => {
const [update, setUpdate] = React.useState<undefined | { latest: string }>(undefined)

useEffect(() => {
const interval = setInterval(() => {
const fetchVersion = () => {
if (!nativeAPI) return
nativeAPI
.getServerVersion(`${BATTLECODE_YEAR % 100}`)
Expand All @@ -18,7 +18,10 @@ export const UpdateWarning = () => {
}
})
.catch(() => {})
}, 1000 * 60 * UPDATE_CHECK_MINUTES)
}

fetchVersion()
const interval = setInterval(fetchVersion, 1000 * 60 * UPDATE_CHECK_MINUTES)

return () => clearInterval(interval)
}, [])
Expand Down

0 comments on commit 1e12bf6

Please sign in to comment.