This commit is contained in:
Forrest Wolf 2022-05-31 21:36:14 -04:00
parent 7722154a5d
commit a0c8f2d1f1
2 changed files with 3 additions and 3 deletions

View File

@ -82,7 +82,7 @@ export function BetsList(props: { user: User; hideBetsBefore?: number }) {
disposed = true
}
}
}, [allBets])
}, [bets])
const getTime = useTimeSinceFirstRender()
useEffect(() => {

View File

@ -16,7 +16,7 @@ export function useListenElemSize<T extends HTMLElement>(
debounceMs: number | undefined = undefined
) {
const handleResize = useMemo(() => {
let updateSize = () => {
const updateSize = () => {
if (elemRef.current) callback(getSize(elemRef.current))
}
@ -25,7 +25,7 @@ export function useListenElemSize<T extends HTMLElement>(
: updateSize
}, [callback, elemRef, debounceMs])
let elem = elemRef.current
const elem = elemRef.current
useLayoutEffect(() => {
if (!elemRef.current) return