From 30adb5e1f80b676c3b7b09a5187249282fd0fcc0 Mon Sep 17 00:00:00 2001 From: Forrest Wolf Date: Tue, 31 May 2022 21:36:00 -0500 Subject: [PATCH] Fix dependency of useEffect in BetsList (#379) * Fix dependency of useEffect in BetsList * Revert "Fix dependency of useEffect in BetsList" This reverts commit 077b211f22eff039c7e684d9714a5d3e7d824a26. * Disable linter for BetsList useEffect deps * Add hideBetsBefore to useEffect dependencies * Fix formatting --- web/components/bets-list.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/components/bets-list.tsx b/web/components/bets-list.tsx index ff5a31e1..a56ded54 100644 --- a/web/components/bets-list.tsx +++ b/web/components/bets-list.tsx @@ -82,7 +82,8 @@ export function BetsList(props: { user: User; hideBetsBefore?: number }) { disposed = true } } - }, [allBets]) + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [allBets, hideBetsBefore]) const getTime = useTimeSinceFirstRender() useEffect(() => {