···1111 type ViewStyle,
1212} from 'react-native'
1313import {sanitizeUrl} from '@braintree/sanitize-url'
1414-import {StackActions} from '@react-navigation/native'
15141615import {
1716 type DebouncedNavigationProp,
···421420 if (tabState === TabState.InsideAtRoot) {
422421 emitSoftReset()
423422 } else {
423423+ // note: 'navigate' actually acts the same as 'push' nowadays
424424+ // therefore we need to add 'pop' -sfn
424425 // @ts-ignore we're not able to type check on this one -prf
425425- navigation.navigate(routeName, params)
426426+ navigation.navigate(routeName, params, {pop: true})
426427 }
427428 } else {
428429 throw Error('Unsupported navigator action.')
+10-9
src/view/shell/desktop/LeftNav.tsx
···33import {type AppBskyActorDefs} from '@atproto/api'
44import {msg, plural, Trans} from '@lingui/macro'
55import {useLingui} from '@lingui/react'
66-import {
77- useLinkTo,
88- useNavigation,
99- useNavigationState,
1010-} from '@react-navigation/native'
66+import {useNavigation, useNavigationState} from '@react-navigation/native'
117128import {useActorStatus} from '#/lib/actor-status'
139import {useAccountSwitcher} from '#/lib/hooks/useAccountSwitcher'
···1612import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries'
1713import {getCurrentRoute, isTab} from '#/lib/routes/helpers'
1814import {makeProfileLink} from '#/lib/routes/links'
1919-import {type CommonNavigatorParams} from '#/lib/routes/types'
1515+import {
1616+ type CommonNavigatorParams,
1717+ type NavigationProp,
1818+} from '#/lib/routes/types'
2019import {useGate} from '#/lib/statsig/statsig'
2120import {sanitizeDisplayName} from '#/lib/strings/display-names'
2221import {isInvalidHandle, sanitizeHandle} from '#/lib/strings/handles'
···339338 (currentRouteInfo.params as CommonNavigatorParams['Profile']).name ===
340339 currentAccount?.handle
341340 : isTab(currentRouteInfo.name, pathName)
342342- const linkTo = useLinkTo()
341341+ const navigation = useNavigation<NavigationProp>()
343342 const onPressWrapped = useCallback(
344343 (e: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => {
345344 if (e.ctrlKey || e.metaKey || e.altKey) {
···349348 if (isCurrent) {
350349 emitSoftReset()
351350 } else {
352352- linkTo(href)
351351+ const [screen, params] = router.matchPath(href)
352352+ // @ts-expect-error TODO: type matchPath well enough that it can be plugged into navigation.navigate directly
353353+ navigation.popTo(screen, params)
353354 }
354355 },
355355- [linkTo, href, isCurrent],
356356+ [navigation, href, isCurrent],
356357 )
357358358359 return (