diff --git a/apps/scandic-web/components/ContentType/DestinationPage/Blocks/index.tsx b/apps/scandic-web/components/ContentType/DestinationPage/Blocks/index.tsx index 38f6a7bc4..0e2715b3c 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/Blocks/index.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/Blocks/index.tsx @@ -10,15 +10,17 @@ import AccordionSection from "@/components/Blocks/Accordion" import type { BlocksProps } from "@/types/components/blocks" export default function Blocks({ blocks }: BlocksProps) { - const { activeFilters } = useDestinationDataStore((state) => ({ - activeFilters: state.activeFilters, + const { activeSeoFilter } = useDestinationDataStore((state) => ({ + activeSeoFilter: state.activeSeoFilter, })) - if (activeFilters.length) { + const activeBlocks = activeSeoFilter?.blocks ? activeSeoFilter.blocks : blocks + + if (!activeBlocks.length) { return null } - return blocks.map((block, idx) => { + return activeBlocks.map((block, idx) => { switch (block.typename) { case BlocksEnums.block.Accordion: return ( diff --git a/apps/scandic-web/components/ContentType/DestinationPage/DestinationCityPage/CityMap/index.tsx b/apps/scandic-web/components/ContentType/DestinationPage/DestinationCityPage/CityMap/index.tsx index cf71c7c83..97e941f06 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/DestinationCityPage/CityMap/index.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/DestinationCityPage/CityMap/index.tsx @@ -8,7 +8,7 @@ import { Typography } from "@scandic-hotels/design-system/Typography" import { useDestinationDataStore } from "@/stores/destination-data" import CityMapContainer from "../../Map/CityMapContainer" -import { getCityHeadingText } from "../../utils" +import { getHeadingText } from "../../utils" import { BackToCities } from "./BackToCitiesLink" import HotelList from "./HotelList" @@ -32,11 +32,10 @@ export default function CityMap({ defaultLocation, }: CityMapProps) { const intl = useIntl() - const { activeHotels, allFilters, filterFromUrl } = useDestinationDataStore( + const { activeHotels, activeSeoFilter } = useDestinationDataStore( (state) => ({ activeHotels: state.activeHotels, - allFilters: state.allFilters, - filterFromUrl: state.filterFromUrl, + activeSeoFilter: state.activeSeoFilter, }) ) const [fromCountryPage, setIsFromCountryPage] = useState(false) @@ -58,7 +57,7 @@ export default function CityMap({ {fromCountryPage ? : null}

- {getCityHeadingText(intl, city.name, allFilters, filterFromUrl)} + {getHeadingText(intl, city.name, "city", activeSeoFilter)}

diff --git a/apps/scandic-web/components/ContentType/DestinationPage/DestinationCityPage/index.tsx b/apps/scandic-web/components/ContentType/DestinationPage/DestinationCityPage/index.tsx index e97e046e8..2efbe0b7f 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/DestinationCityPage/index.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/DestinationCityPage/index.tsx @@ -117,12 +117,12 @@ export default async function DestinationCityPage({
- {blocks && } +