Don't reference window outside useEffect or click event.
This commit is contained in:
parent
52a2a3d842
commit
05c9d3513a
|
@ -329,7 +329,7 @@ function GroupsList(props: {
|
|||
const { height } = useWindowSize()
|
||||
const [containerRef, setContainerRef] = useState<HTMLDivElement | null>(null)
|
||||
const remainingHeight =
|
||||
(height ?? window.innerHeight) - (containerRef?.offsetTop ?? 0)
|
||||
(height ?? 0) - (containerRef?.offsetTop ?? 0)
|
||||
|
||||
const notifIsForThisItem = useMemo(
|
||||
() => (itemHref: string) =>
|
||||
|
|
Loading…
Reference in New Issue
Block a user