Fix poll latest loop (#1901)
* Avoid pollLatest loop * Set poll interval on profile feeds
This commit is contained in:
@@ -106,6 +106,9 @@ export function Feed({
|
||||
checkForNewRef.current = checkForNew
|
||||
}, [checkForNew])
|
||||
React.useEffect(() => {
|
||||
if (!pollInterval) {
|
||||
return
|
||||
}
|
||||
const i = setInterval(() => checkForNewRef.current?.(), pollInterval)
|
||||
return () => clearInterval(i)
|
||||
}, [pollInterval])
|
||||
|
||||
Reference in New Issue
Block a user