Skip to content

Commit

Permalink
Fix ssr issue in modal effect
Browse files Browse the repository at this point in the history
  • Loading branch information
Temzasse committed Dec 26, 2024
1 parent 5ef080b commit 3eeae3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function useModalEffect({
rootId?: string;
sheetRef: RefObject<HTMLDivElement>;
}) {
const heightRef = useRef(window.innerHeight);
const heightRef = useRef(IS_SSR ? 0 : window.innerHeight);

function setup() {
const root = document.querySelector(`#${rootId}`) as HTMLDivElement;
Expand Down

0 comments on commit 3eeae3c

Please sign in to comment.