diff --git a/src/components/hooks/useOrientationChange.js b/src/components/hooks/useOrientationChange.js index 58b4e75..41c01ab 100644 --- a/src/components/hooks/useOrientationChange.js +++ b/src/components/hooks/useOrientationChange.js @@ -2,6 +2,7 @@ import React, { useCallback, useEffect, useState } from "react"; import { isMobile } from "../../lib/selectors"; export function useMobileOrientation() { + if (typeof window === 'undefined') return; const [state, setState] = useState(() => { const orientation = window.innerWidth > window.innerHeight ? 90 : 0; return {