diff --git a/src/hooks/useBreakpoint.js b/src/hooks/useBreakpoint.js index 7e188b9..83aa4dc 100644 --- a/src/hooks/useBreakpoint.js +++ b/src/hooks/useBreakpoint.js @@ -48,6 +48,12 @@ const resolveBreakpoint = (width) => { * @returns {Breakpoint} */ export const useBreakpoint = () => { + + // for server side rendering + if (typeof window === 'undefined') { + return Breakpoint.xxl; + } + const [size, setSize] = useState(() => resolveBreakpoint(window.innerWidth)); const setBreakpoint = () => { diff --git a/src/pages/apply.js b/src/pages/apply.js index be31bc4..5e556c7 100644 --- a/src/pages/apply.js +++ b/src/pages/apply.js @@ -1,5 +1,3 @@ -'use client'; - import React from 'react'; import Particles from 'react-particles-js'; import Container from 'react-bootstrap/Container';