Fix a potential reference error in bottombarweb (#1600)
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user