mirror of
https://github.com/Thream/website.git
synced 2024-07-21 09:28:32 +02:00
fix: only allow to swipe left if there is a right sidebar
This commit is contained in:
parent
8bb4ef8b54
commit
5ef8f18060
@ -121,13 +121,15 @@ export const Application: React.FC<ApplicationProps> = (props) => {
|
||||
})
|
||||
},
|
||||
onSwipedLeft: () => {
|
||||
if (visibleSidebars.left) {
|
||||
return setVisibleSidebars({ ...visibleSidebars, left: false })
|
||||
if (isGuildsChannelsPath(path)) {
|
||||
if (visibleSidebars.left) {
|
||||
return setVisibleSidebars({ ...visibleSidebars, left: false })
|
||||
}
|
||||
setVisibleSidebars({
|
||||
...visibleSidebars,
|
||||
right: true
|
||||
})
|
||||
}
|
||||
setVisibleSidebars({
|
||||
...visibleSidebars,
|
||||
right: true
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user