We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7154aa6 commit 7536f4eCopy full SHA for 7536f4e
src/hooks/useBreakpoint.js
@@ -48,6 +48,12 @@ const resolveBreakpoint = (width) => {
48
* @returns {Breakpoint}
49
*/
50
export const useBreakpoint = () => {
51
+
52
+ // for server side rendering
53
+ if (typeof window === 'undefined') {
54
+ return Breakpoint.xxl;
55
+ }
56
57
const [size, setSize] = useState(() => resolveBreakpoint(window.innerWidth));
58
59
const setBreakpoint = () => {
src/pages/apply.js
@@ -1,5 +1,3 @@
1
-'use client';
2
-
3
import React from 'react';
4
import Particles from 'react-particles-js';
5
import Container from 'react-bootstrap/Container';
0 commit comments