Skip to content

Commit 2a1df89

Browse files
committed
Remove media query in JavaScript to eliminate error
1 parent 751707f commit 2a1df89

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

components/JottingsControls/jottingsControl.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,6 @@ export default function JottingsControl(props) {
1616
const [labels, setLabels] = useState(null);
1717

1818
const router = useRouter();
19-
const [matches, setMatches] = useState(
20-
window.matchMedia("(min-width: 800px)").matches
21-
)
22-
23-
useEffect(() => {
24-
25-
const handleResize = e => {
26-
setMatches(e.matches);
27-
};
28-
29-
window
30-
.matchMedia("(min-width: 800px)")
31-
.addEventListener('change', handleResize);
32-
33-
return () => { removeEventListener('change', handleResize); };
34-
}, []);
3519

3620
const getJotsToShow = (response, jotType) => {
3721
if (

0 commit comments

Comments
 (0)