Merge pull request #192 from humarkx/master

feat: when opening a direct link tx whithout previously loading the d…
This commit is contained in:
ping 2022-08-31 19:15:56 +08:00 committed by GitHub
commit 3db98be00a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,11 +57,12 @@ export const isNavLinkActive = link => {
chainCompare = router.currentRoute.params.chain === link.route.params.chain chainCompare = router.currentRoute.params.chain === link.route.params.chain
} }
if (chainCompare) {
localStorage.setItem('selected_chain', link.route.params.chain)
}
return matchedRoutes.some(route => { return matchedRoutes.some(route => {
const actived = (route.name === resolveRoutedName && chainCompare) || route.meta.navActiveLink === resolveRoutedName const actived = (route.name === resolveRoutedName && chainCompare) || route.meta.navActiveLink === resolveRoutedName
if (actived) {
localStorage.setItem('selected_chain', link.route.params.chain)
}
return actived return actived
}) })
} }