fix(SW-1446): use existing functions for url data

This commit is contained in:
Michael Zetterberg
2025-04-04 13:27:40 +02:00
parent 9e84da45bc
commit 4aeb5b071d
6 changed files with 72 additions and 98 deletions

View File

@@ -301,13 +301,13 @@ export const getJumpToData = cache(async function getMemoizedJumpToData() {
if (isCity) {
url = urls.cities.find(
(c) =>
c.id &&
c.city &&
location.cityIdentifier &&
c.id === location.cityIdentifier
c.city === location.cityIdentifier
)?.url
} else if (isHotel) {
url = urls.hotels.find(
(h) => h.id && location.id && h.id === location.id
(h) => h.hotelId && location.id && h.hotelId === location.id
)?.url
}