Files
web/components/HotelReservation/HotelCard/HotelPriceList/index.tsx
Bianca Widstam 87a89c5d81 feat/SW-843-UI-hotel-card-select-hotel (pull request #887)
Approved-by: Pontus Dreij
Approved-by: Niclas Edenvin
2024-11-14 09:14:26 +00:00

43 lines
1.1 KiB
TypeScript

import { useIntl } from "react-intl"
import { ErrorCircleIcon } from "@/components/Icons"
import Body from "@/components/TempDesignSystem/Text/Body"
import HotelPriceCard from "./HotelPriceCard"
import styles from "./hotelPriceList.module.css"
import { HotelPriceListProps } from "@/types/components/hotelReservation/selectHotel/hotePriceListProps"
export default function HotelPriceList({ price }: HotelPriceListProps) {
const intl = useIntl()
return (
<>
{price ? (
<>
<HotelPriceCard
currency={price?.currency}
regularAmount={price?.regularAmount}
/>
<HotelPriceCard
currency={price?.currency}
memberAmount={price?.memberAmount}
/>
</>
) : (
<div className={styles.priceCard}>
<div className={styles.noRooms}>
<ErrorCircleIcon color="red" />
<Body>
{intl.formatMessage({
id: "There are no rooms available that match your request",
})}
</Body>
</div>
</div>
)}
</>
)
}