fix(sw-453): Correct view of cards and icons when filter

This commit is contained in:
Pontus Dreij
2024-11-01 10:58:11 +01:00
parent 644ce369aa
commit f79eb7d5a9
5 changed files with 38 additions and 20 deletions

View File

@@ -23,6 +23,7 @@ export default function RoomCard({
rateDefinitions,
roomConfiguration,
roomCategories,
selectedPackages,
handleSelectRate,
}: RoomCardProps) {
const intl = useIntl()
@@ -133,15 +134,17 @@ export default function RoomCard({
>{`${roomConfiguration.roomsLeft} ${intl.formatMessage({ id: "Left" })}`}</Footnote>
</span>
)}
{roomConfiguration.features.map((feature) => (
<span className={styles.chip} key={feature.code}>
{createElement(getIconForFeatureCode(feature.code), {
width: 16,
height: 16,
color: "burgundy",
})}
</span>
))}
{roomConfiguration.features
.filter((feature) => selectedPackages.includes(feature.code))
.map((feature) => (
<span className={styles.chip} key={feature.code}>
{createElement(getIconForFeatureCode(feature.code), {
width: 16,
height: 16,
color: "burgundy",
})}
</span>
))}
</div>
{/*NOTE: images from the test API are hosted on test3.scandichotels.com,
which can't be accessed unless on Scandic's Wifi or using Citrix. */}