Fix search history

This commit is contained in:
Dan Abramov
2024-04-27 01:06:13 +01:00
parent 30eadaab5f
commit 36e50b786c
+5
View File
@@ -609,8 +609,13 @@ export function SearchScreen(
)
const handleHistoryItemClick = (item: string) => {
if (isWeb) {
navigation.push('Search', {q: item})
} else {
setShowAutocomplete(false)
navigation.setParams({q: item})
}
}
const handleRemoveHistoryItem = (itemToRemove: string) => {
const updatedHistory = searchHistory.filter(item => item !== itemToRemove)