Merged in fix/sw-1177-search-history (pull request #1124)

fix(SW-1177): fix localization problems in search history

* fix(SW-1177): fix localization problems in search history

When saving search history the whole location objects where stored and
also used later. This made the list display in different languages if
the user previously had search for something in another language.
Another issue where that the list where also deduped based on name of
the search item, which meant that there could be multiple history
items for the same entity and the same ID, e.g. `Gothenburg` and
`Göteborg`.


Approved-by: Bianca Widstam
This commit is contained in:
Niclas Edenvin
2025-01-07 10:32:32 +00:00
parent 3b88f38ac6
commit 0ac09f37f6
2 changed files with 49 additions and 16 deletions

View File

@@ -9,6 +9,11 @@ export interface SearchProps {
handlePressEnter: () => void
}
export type SearchHistoryItem = {
type: "cities" | "hotels"
id: string
}
type HighlightedIndex = number | null
export interface SearchListProps {