Fix dependency of useEffect in BetsList (#379)

* Fix dependency of useEffect in BetsList

* Revert "Fix dependency of useEffect in BetsList"

This reverts commit 077b211f22.

* Disable linter for BetsList useEffect deps

* Add hideBetsBefore to useEffect dependencies

* Fix formatting
This commit is contained in:
Forrest Wolf 2022-05-31 21:36:00 -05:00 committed by GitHub
parent 9cb24c9f3c
commit 30adb5e1f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,7 +82,8 @@ export function BetsList(props: { user: User; hideBetsBefore?: number }) {
disposed = true disposed = true
} }
} }
}, [allBets]) // eslint-disable-next-line react-hooks/exhaustive-deps
}, [allBets, hideBetsBefore])
const getTime = useTimeSinceFirstRender() const getTime = useTimeSinceFirstRender()
useEffect(() => { useEffect(() => {