feat(SW-826): Hide Button if not isSelectHotelPage and removed accordion for Accessibility

This commit is contained in:
Pontus Dreij
2024-11-13 15:49:40 +01:00
parent 7c2facab40
commit a66427fccc

View File

@@ -31,6 +31,8 @@ export default function HotelSidePeek({
const intl = useIntl()
const amenitiesList = getAmenitiesList(hotel)
const isSelectHotelPage = window.location.href.includes("select-hotel")
return (
<SidePeek
title={hotel.name}
@@ -51,9 +53,9 @@ export default function HotelSidePeek({
))}
</AccordionItem>
) : null}
<AccordionItem title={intl.formatMessage({ id: "Accessibility" })}>
TODO: What content should be in the accessibility section?
</AccordionItem>
<div className={styles.amenity}>
{intl.formatMessage({ id: "Accessibility" })}
</div>
{amenitiesList.map((amenity) => {
return (
<div key={amenity.id} className={styles.amenity}>
@@ -62,8 +64,10 @@ export default function HotelSidePeek({
)
})}
</Accordion>
{/* TODO: handle linking to Hotel Page */}
<Button theme={"base"}>To the hotel</Button>
{isSelectHotelPage && (
/* TODO: handle linking to Hotel Page */
<Button theme={"base"}>To the hotel</Button>
)}
</div>
</SidePeek>
)