Merged in fix/STAY-131-hide-ancillaries (pull request #3299)

fix: fix logic for identifying single use ancillaries

* fix: fix logic for identifying single use ancillaries

* fix: filter out empty categories of ancillaries


Approved-by: Erik Tiekstra
This commit is contained in:
Christel Westerberg
2025-12-05 12:25:12 +00:00
parent 3bd23bf56e
commit 001000a56d
7 changed files with 125 additions and 73 deletions

View File

@@ -1,6 +1,6 @@
import { useIntl } from "react-intl"
import { Typography } from "@scandic-hotels/design-system/Typography"
import { ChipButton } from "@scandic-hotels/design-system/ChipButton"
import { useAddAncillaryStore } from "@/stores/my-stay/add-ancillary-flow"
@@ -30,22 +30,20 @@ export default function SelectAncillaryStep({
<div className={styles.container}>
<div className={styles.tabs}>
{categories.map((categoryName) => (
<button
<ChipButton
onPress={() => selectCategory(categoryName)}
key={categoryName}
className={`${styles.chip} ${categoryName === selectedCategory ? styles.selected : ""}`}
onClick={() => selectCategory(categoryName)}
selected={categoryName === selectedCategory}
variant="FilterRounded"
size="Large"
>
<Typography variant="Body/Supporting text (caption)/smRegular">
<p>
{categoryName
? categoryName
: intl.formatMessage({
id: "common.other",
defaultMessage: "Other",
})}
</p>
</Typography>
</button>
{categoryName
? categoryName
: intl.formatMessage({
id: "common.other",
defaultMessage: "Other",
})}
</ChipButton>
))}
</div>