aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/App.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-02-01 14:01:30 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:54 +0300
commit59b586332a3868c90666addcd7a675e32ca6b665 (patch)
tree934a5b1a76a330fcf8025c05b2003e14110ba1d7 /vnext/src/App.js
parent2c5d92c852857cdb5b8ea78d744fb4fc122590c9 (diff)
Fix matchMedia queries
Diffstat (limited to 'vnext/src/App.js')
-rw-r--r--vnext/src/App.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/vnext/src/App.js b/vnext/src/App.js
index af364fe2..a519eedd 100644
--- a/vnext/src/App.js
+++ b/vnext/src/App.js
@@ -91,8 +91,8 @@ export default class App extends React.Component {
history.push(location);
}
toggleSidebar = () => {
- const isMobile = window.matchMedia('width < 62.5rem');
- if (isMobile.matches) {
+ const isDesktop = window.matchMedia('(min-width: 62.5rem)');
+ if (!isDesktop.matches) {
let width = this.sidebar.current.style.width;
this.sidebar.current.style.width = width === '248px' ? '0' : '248px';
let leftMargin = this.state.appMarginLeft === 'inherit' ? '250px' : 'inherit';