fix(SW-1111) Moved map to a page instead of intercepted route

This commit is contained in:
Pontus Dreij
2024-12-05 15:23:02 +01:00
parent 098e35d8d7
commit 69fa5b9b31
17 changed files with 140 additions and 155 deletions

View File

@@ -23,7 +23,7 @@ export default function List({
getItemProps={getItemProps}
highlightedIndex={highlightedIndex}
index={initialIndex + index}
key={location.id}
key={location.id + index}
location={location}
/>
))}

View File

@@ -26,6 +26,7 @@ import type { SearchProps } from "@/types/components/search"
import type { Location } from "@/types/trpc/routers/hotel/locations"
const name = "search"
export default function Search({ locations }: SearchProps) {
const { register, setValue, trigger, unregister } =
useFormContext<BookingWidgetSchema>()
@@ -166,7 +167,6 @@ export default function Search({ locations }: SearchProps) {
onInputValueChange={(inputValue) => dispatchInputValue(inputValue)}
>
{({
closeMenu,
getInputProps,
getItemProps,
getLabelProps,
@@ -207,9 +207,6 @@ export default function Search({ locations }: SearchProps) {
id: "Destinations & hotels",
}),
...register(name, {
onBlur: function () {
closeMenu()
},
onChange: handleOnChange,
}),
type: "search",