Allow back navigation to home on profile header (#1717)
Navigate back to home if there is no navigation history.zio/stable
parent
97ce9a73d2
commit
21f7a2a247
|
@ -119,7 +119,11 @@ const ProfileHeaderLoaded = observer(function ProfileHeaderLoadedImpl({
|
|||
const [showSuggestedFollows, setShowSuggestedFollows] = React.useState(false)
|
||||
|
||||
const onPressBack = React.useCallback(() => {
|
||||
navigation.goBack()
|
||||
if (navigation.canGoBack()) {
|
||||
navigation.goBack()
|
||||
} else {
|
||||
navigation.navigate('Home')
|
||||
}
|
||||
}, [navigation])
|
||||
|
||||
const onPressAvi = React.useCallback(() => {
|
||||
|
|
Loading…
Reference in New Issue