mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-22 07:00:58 -05:00
Fix: Bottom navigation would not let you escape friends.
This commit is contained in:
parent
324b87b9b5
commit
55633219f9
1 changed files with 9 additions and 9 deletions
|
@ -43,22 +43,22 @@ export function BottomNavigation({ lastOpened }: Props) {
|
||||||
const settingsActive = path.startsWith("/settings");
|
const settingsActive = path.startsWith("/settings");
|
||||||
const homeActive = !(friendsActive || settingsActive);
|
const homeActive = !(friendsActive || settingsActive);
|
||||||
|
|
||||||
// console.info(channel_id);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<NavigationBase>
|
<NavigationBase>
|
||||||
<Button active={homeActive}>
|
<Button active={homeActive}>
|
||||||
<IconButton
|
<IconButton
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (!homeActive) {
|
if (settingsActive) {
|
||||||
if (settingsActive) {
|
if (history.length > 0) {
|
||||||
if (history.length > 0) {
|
history.goBack();
|
||||||
history.goBack();
|
|
||||||
} else {
|
|
||||||
history.push('/');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (channel_id) {
|
||||||
|
history.push(`/channel/${channel_id}`);
|
||||||
|
} else {
|
||||||
|
history.push('/');
|
||||||
|
}
|
||||||
}}>
|
}}>
|
||||||
<Message size={24} />
|
<Message size={24} />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
|
|
Loading…
Reference in a new issue