remove q= on cancel

This commit is contained in:
Hailey
2024-04-26 13:24:48 -07:00
parent 46a6a5bbee
commit 556fb386c2
+2 -1
View File
@@ -537,7 +537,8 @@ export function SearchScreen(
setInputIsFocused(false)
setSearchText(queryParam)
} else {
navigation.setParams({q: ''})
// The empty object will remove `q=` from the URL
navigation.replace('Search', {})
}
}, [inputIsFocused, navigation, queryParam])