fixing navigation issue
This commit is contained in:
@@ -603,10 +603,10 @@ export function SearchScreen(
|
|||||||
updateSearchHistory(item)
|
updateSearchHistory(item)
|
||||||
|
|
||||||
if (isWeb) {
|
if (isWeb) {
|
||||||
navigation.push('Search', {q: item})
|
navigation.replace('Search', {q: item})
|
||||||
} else {
|
} else {
|
||||||
textInput.current?.blur()
|
textInput.current?.blur()
|
||||||
navigation.setParams({q: item})
|
navigation.replace('Search', {q: item})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[updateSearchHistory, navigation],
|
[updateSearchHistory, navigation],
|
||||||
@@ -619,13 +619,19 @@ export function SearchScreen(
|
|||||||
updateSelectedProfiles(profile)
|
updateSelectedProfiles(profile)
|
||||||
|
|
||||||
if (isWeb) {
|
if (isWeb) {
|
||||||
navigation.push('Profile', {name: profile.handle})
|
navigation.reset({
|
||||||
|
index: 1,
|
||||||
|
routes: [
|
||||||
|
{name: 'Search', params: {q: searchText}},
|
||||||
|
{name: 'Profile', params: {name: profile.handle}},
|
||||||
|
],
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
textInput.current?.blur()
|
textInput.current?.blur()
|
||||||
navigation.navigate('Profile', {name: profile.handle})
|
navigation.navigate('Profile', {name: profile.handle})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[updateSelectedProfiles, navigation],
|
[updateSelectedProfiles, navigation, searchText],
|
||||||
)
|
)
|
||||||
|
|
||||||
const onSubmit = React.useCallback(() => {
|
const onSubmit = React.useCallback(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user