feat: show both prices for multiroom room 2-4 on all users
This commit is contained in:
@@ -26,6 +26,7 @@ export default function SelectedRoomPanel() {
|
||||
}))
|
||||
const {
|
||||
actions: { modifyRate },
|
||||
isMainRoom,
|
||||
roomNr,
|
||||
selectedRate,
|
||||
} = useRoomContext()
|
||||
@@ -64,10 +65,10 @@ export default function SelectedRoomPanel() {
|
||||
}
|
||||
}
|
||||
|
||||
const rateCode =
|
||||
isUserLoggedIn && selectedRate?.product.productType.member
|
||||
? selectedRate?.product.productType.member?.rateCode
|
||||
: selectedRate?.product.productType.public.rateCode
|
||||
const rate =
|
||||
isUserLoggedIn && isMainRoom && selectedRate?.product.productType.member
|
||||
? selectedRate?.product.productType.member
|
||||
: selectedRate?.product.productType.public
|
||||
|
||||
return (
|
||||
<div className={styles.selectedRoomPanel}>
|
||||
@@ -82,11 +83,10 @@ export default function SelectedRoomPanel() {
|
||||
{selectedRate?.roomType}
|
||||
</Subtitle>
|
||||
<Body color="uiTextMediumContrast">
|
||||
{rateCode ? getRateDetails(rateCode) : null}
|
||||
{rate?.rateCode ? getRateDetails(rate.rateCode) : null}
|
||||
</Body>
|
||||
<Body color="uiTextHighContrast">
|
||||
{selectedRate?.product.productType.public.localPrice.pricePerNight}{" "}
|
||||
{selectedRate?.product.productType.public.localPrice.currency}/
|
||||
{rate?.localPrice.pricePerNight} {rate?.localPrice.currency}/
|
||||
{intl.formatMessage({ id: "night" })}
|
||||
</Body>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user