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: () => {
|
onSwipedLeft: () => {
|
||||||
if (visibleSidebars.left) {
|
if (isGuildsChannelsPath(path)) {
|
||||||
return setVisibleSidebars({ ...visibleSidebars, left: false })
|
if (visibleSidebars.left) {
|
||||||
|
return setVisibleSidebars({ ...visibleSidebars, left: false })
|
||||||
|
}
|
||||||
|
setVisibleSidebars({
|
||||||
|
...visibleSidebars,
|
||||||
|
right: true
|
||||||
|
})
|
||||||
}
|
}
|
||||||
setVisibleSidebars({
|
|
||||||
...visibleSidebars,
|
|
||||||
right: true
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user