From 55633219f914a3401e9852a15f5f0d16fc720d8e Mon Sep 17 00:00:00 2001 From: Paul <paulmakles@gmail.com> Date: Sat, 3 Jul 2021 15:00:17 +0100 Subject: [PATCH] Fix: Bottom navigation would not let you escape friends. --- src/components/navigation/BottomNavigation.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/navigation/BottomNavigation.tsx b/src/components/navigation/BottomNavigation.tsx index f8f0477..f2d2482 100644 --- a/src/components/navigation/BottomNavigation.tsx +++ b/src/components/navigation/BottomNavigation.tsx @@ -43,22 +43,22 @@ export function BottomNavigation({ lastOpened }: Props) { const settingsActive = path.startsWith("/settings"); const homeActive = !(friendsActive || settingsActive); - // console.info(channel_id); - return ( <NavigationBase> <Button active={homeActive}> <IconButton onClick={() => { - if (!homeActive) { - if (settingsActive) { - if (history.length > 0) { - history.goBack(); - } else { - history.push('/'); - } + if (settingsActive) { + if (history.length > 0) { + history.goBack(); } } + + if (channel_id) { + history.push(`/channel/${channel_id}`); + } else { + history.push('/'); + } }}> <Message size={24} /> </IconButton> -- GitLab