mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-10 01:03:36 -05:00
fix(sidebar): force open on mobile devices
This commit is contained in:
parent
8a0033699d
commit
d7f52fb6f4
1 changed files with 4 additions and 1 deletions
|
@ -1,6 +1,8 @@
|
|||
import { observer } from "mobx-react-lite";
|
||||
import { Route, Switch } from "react-router";
|
||||
|
||||
import { isTouchscreenDevice } from "../../lib/isTouchscreenDevice";
|
||||
|
||||
import { useApplicationState } from "../../mobx/State";
|
||||
import { SIDEBAR_CHANNELS } from "../../mobx/stores/Layout";
|
||||
|
||||
|
@ -11,7 +13,8 @@ import ServerSidebar from "./left/ServerSidebar";
|
|||
|
||||
export default observer(() => {
|
||||
const layout = useApplicationState().layout;
|
||||
const isOpen = layout.getSectionState(SIDEBAR_CHANNELS, true);
|
||||
const isOpen =
|
||||
isTouchscreenDevice || layout.getSectionState(SIDEBAR_CHANNELS, true);
|
||||
|
||||
return (
|
||||
<SidebarBase>
|
||||
|
|
Loading…
Reference in a new issue