diff options
-rw-r--r-- | src/view/shell/bottom-bar/BottomBarWeb.tsx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/view/shell/bottom-bar/BottomBarWeb.tsx b/src/view/shell/bottom-bar/BottomBarWeb.tsx index 6448eea63..e20214235 100644 --- a/src/view/shell/bottom-bar/BottomBarWeb.tsx +++ b/src/view/shell/bottom-bar/BottomBarWeb.tsx @@ -109,7 +109,12 @@ const NavItem: React.FC<{ href: string routeName: string }> = ({children, href, routeName}) => { - const currentRoute = useNavigationState(getCurrentRoute) + const currentRoute = useNavigationState(state => { + if (!state) { + return {name: 'Home'} + } + return getCurrentRoute(state) + }) const store = useStores() const isActive = currentRoute.name === 'Profile' |