fix(BOOK-138): Fixed several issues after country map functionality was added

* fix(BOOK-138): Fixed issue when hovering markers and info windows for both city cluster marker as city markers.

Approved-by: Matilda Landström
This commit is contained in:
Erik Tiekstra
2025-10-07 11:37:54 +00:00
parent d88cd3f418
commit 36aa5089ea
17 changed files with 347 additions and 197 deletions

View File

@@ -128,8 +128,15 @@ export async function getCityPages(
const publishedCities = cities[apiCountry].filter((city) => city.isPublished)
// It happens we receive duplicate cities with the same city identifier.
// Remove duplicate cities based on city identifier
const uniquePublishedCities = publishedCities.filter(
(city, index, self) =>
index === self.findIndex((c) => c.cityIdentifier === city.cityIdentifier)
)
const cityPages = await Promise.all(
publishedCities.map(async (city) => {
uniquePublishedCities.map(async (city) => {
if (!city.cityIdentifier) {
return null
}