mirror of
https://github.com/revoltchat/revite.git
synced 2024-12-24 06:32:08 -05:00
Fix: Hide panels in server / channel settings.
This commit is contained in:
parent
7586b365fe
commit
4f6d2de75f
1 changed files with 2 additions and 3 deletions
|
@ -35,12 +35,11 @@ export default function App() {
|
||||||
const path = useLocation().pathname;
|
const path = useLocation().pathname;
|
||||||
const fixedBottomNav =
|
const fixedBottomNav =
|
||||||
path === "/" || path === "/settings" || path.startsWith("/friends");
|
path === "/" || path === "/settings" || path.startsWith("/friends");
|
||||||
const inSettings = path.includes("/settings");
|
|
||||||
const inChannel = path.includes("/channel");
|
const inChannel = path.includes("/channel");
|
||||||
const inSpecial =
|
const inSpecial =
|
||||||
(path.startsWith("/friends") && isTouchscreenDevice) ||
|
(path.startsWith("/friends") && isTouchscreenDevice) ||
|
||||||
path.startsWith("/invite") ||
|
path.startsWith("/invite") ||
|
||||||
path.startsWith("/settings");
|
path.includes("/settings");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<OverlappingPanels
|
<OverlappingPanels
|
||||||
|
@ -52,7 +51,7 @@ export default function App() {
|
||||||
: { width: 292, component: <LeftSidebar /> }
|
: { width: 292, component: <LeftSidebar /> }
|
||||||
}
|
}
|
||||||
rightPanel={
|
rightPanel={
|
||||||
!inSettings && inChannel
|
!inSpecial && inChannel
|
||||||
? { width: 240, component: <RightSidebar /> }
|
? { width: 240, component: <RightSidebar /> }
|
||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue