fix: update polling interval to 60 seconds for server data fetch
All checks were successful
CI - Build and Push / Build and Push Docker Image (push) Successful in 32s
All checks were successful
CI - Build and Push / Build and Push Docker Image (push) Successful in 32s
This commit is contained in:
@@ -90,13 +90,13 @@ export function ServerProvider({ children }: { children: ReactNode }) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initial fetch and polling every 2 seconds
|
// Initial fetch and polling every 60 seconds
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetchServerData()
|
fetchServerData()
|
||||||
|
|
||||||
const interval = setInterval(() => {
|
const interval = setInterval(() => {
|
||||||
fetchServerData()
|
fetchServerData()
|
||||||
}, 2000) // Poll every 2 seconds
|
}, 60000) // Poll every 60 seconds
|
||||||
|
|
||||||
return () => clearInterval(interval)
|
return () => clearInterval(interval)
|
||||||
}, []) // Empty dependency array is intentional - we want this to run once
|
}, []) // Empty dependency array is intentional - we want this to run once
|
||||||
|
|||||||
Reference in New Issue
Block a user