Skip to content
Snippets Groups Projects
Commit 6cade088 authored by danieldeng2's avatar danieldeng2
Browse files

Fix sidebar behaviour on tablets

parent 144bc608
No related branches found
No related tags found
No related merge requests found
......@@ -29,22 +29,32 @@ class App extends React.Component<{}, AppState> {
}
toggleLeftBar() {
if (window.innerWidth <= 1024) {
if (window.innerWidth <= 1024) {
this.setState({
toggledRight: false,
});
toggledRight: true,
});
}
if (window.innerWidth <= 992) {
this.setState({
toggledRight: false,
});
}
this.setState((state) => ({
toggledLeft: !state.toggledLeft,
}));
}
toggleRightBar() {
if (window.innerWidth <= 1024) {
if (window.innerWidth <= 1024) {
this.setState({
toggledLeft: true,
});
}
if (window.innerWidth <= 992) {
this.setState({
toggledLeft: false,
});
}
});
}
this.setState((state) => ({
toggledRight: !state.toggledRight,
}));
......
......@@ -28,7 +28,7 @@ const StandardView: React.FC<StandardViewProps> = ({
toggledLeft,
toggledRight,
onOverlayClick,
}: StandardViewProps) => {
}: StandardViewProps) => {
return (
<div
id="wrapper"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment