fix(SW-1446): use existing functions for url data
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user