We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cd6d34f commit 0e066beCopy full SHA for 0e066be
my-app/src/pages/App.jsx
@@ -25,7 +25,13 @@ function App({ model }) {
25
return () => {
26
window.removeEventListener("unload", clearStorageOnUnload);
27
};
28
- }, []);
+ }, []);
29
+
30
+ useState(() => {
31
+ if (window.innerWidth < 700) {
32
+ setSidebarIsOpen(false);
33
+ }
34
+ });
35
36
return (
37
/* The sidebar styling(under the menu)*/
@@ -38,7 +44,7 @@ function App({ model }) {
38
44
width={
39
45
window.innerWidth < 700
40
46
? "100%"
41
- : Math.max(window.innerWidth * 0.26, 300)
47
+ : Math.min(Math.max(window.innerWidth * 0.26, 300), 400)
42
48
}
43
49
isOpen={sidebarIsOpen}
50
onStateChange={(state) => setSidebarIsOpen(state.isOpen)}
0 commit comments