···1818 useNavigationDeduped,
1919} from '#/lib/hooks/useNavigationDeduped'
2020import {useOpenLink} from '#/lib/hooks/useOpenLink'
2121+import {getTabState, TabState} from '#/lib/routes/helpers'
2122import {
2223 convertBskyAppUrlIfNeeded,
2324 isExternalUrl,
···2526} from '#/lib/strings/url-helpers'
2627import {TypographyVariant} from '#/lib/ThemeContext'
2728import {isAndroid, isWeb} from '#/platform/detection'
2929+import {emitSoftReset} from '#/state/events'
2830import {useModalControls} from '#/state/modals'
2931import {WebAuxClickWrapper} from '#/view/com/util/WebAuxClickWrapper'
3032import {useTheme} from '#/alf'
···400402 } else {
401403 closeModal() // close any active modals
402404405405+ const [routeName, params] = router.matchPath(href)
403406 if (navigationAction === 'push') {
404407 // @ts-ignore we're not able to type check on this one -prf
405405- navigation.dispatch(StackActions.push(...router.matchPath(href)))
408408+ navigation.dispatch(StackActions.push(routeName, params))
406409 } else if (navigationAction === 'replace') {
407410 // @ts-ignore we're not able to type check on this one -prf
408408- navigation.dispatch(StackActions.replace(...router.matchPath(href)))
411411+ navigation.dispatch(StackActions.replace(routeName, params))
409412 } else if (navigationAction === 'navigate') {
410410- // @ts-ignore we're not able to type check on this one -prf
411411- navigation.navigate(...router.matchPath(href))
413413+ const state = navigation.getState()
414414+ const tabState = getTabState(state, routeName)
415415+ if (tabState === TabState.InsideAtRoot) {
416416+ emitSoftReset()
417417+ } else {
418418+ // @ts-ignore we're not able to type check on this one -prf
419419+ navigation.navigate(routeName, params)
420420+ }
412421 } else {
413422 throw Error('Unsupported navigator action.')
414423 }