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