This commit is contained in:
Muhammad Eko 2024-10-01 15:32:41 +07:00
parent c212a837cd
commit 830ac1923d
1 changed files with 2 additions and 2 deletions

View File

@ -15,8 +15,8 @@ function useDimensions(ref: RefObject<HTMLElement>) {
height: ref.current?.offsetHeight ?? 0,
}),
() => JSON.stringify({
width: window.innerWidth,
height: window.innerHeight
width: 0,
height: 0,
})
)
return useMemo(() => JSON.parse(dimensions), [dimensions])