Merged in fix/SW-2739-reward-night-CTA-map (pull request #2446)
fix(SW-2739): only show not enough points if redemption * fix(SW-2739): only show not enough points if redemption * fix(SW-2739): rename variable Approved-by: Arvid Norlin
This commit is contained in:
@@ -62,6 +62,7 @@ export default function ListingHotelCardDialog({
|
|||||||
const notEnoughPointsLabel = intl.formatMessage({
|
const notEnoughPointsLabel = intl.formatMessage({
|
||||||
defaultMessage: "Not enough points",
|
defaultMessage: "Not enough points",
|
||||||
})
|
})
|
||||||
|
const shouldShowNotEnoughPoints = redemptionPrice && !hasEnoughPoints
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
@@ -216,7 +217,13 @@ export default function ListingHotelCardDialog({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{hasEnoughPoints ? (
|
{shouldShowNotEnoughPoints ? (
|
||||||
|
<div className={styles.notEnoughPointsButton}>
|
||||||
|
<Typography variant="Body/Paragraph/mdBold">
|
||||||
|
<span>{notEnoughPointsLabel}</span>
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
<Button
|
<Button
|
||||||
asChild
|
asChild
|
||||||
theme="base"
|
theme="base"
|
||||||
@@ -233,12 +240,6 @@ export default function ListingHotelCardDialog({
|
|||||||
})}
|
})}
|
||||||
</Link>
|
</Link>
|
||||||
</Button>
|
</Button>
|
||||||
) : (
|
|
||||||
<div className={styles.notEnoughPointsButton}>
|
|
||||||
<Typography variant="Body/Paragraph/mdBold">
|
|
||||||
<span>{notEnoughPointsLabel}</span>
|
|
||||||
</Typography>
|
|
||||||
</div>
|
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -63,6 +63,8 @@ export default function StandaloneHotelCardDialog({
|
|||||||
defaultMessage: "Not enough points",
|
defaultMessage: "Not enough points",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const shouldShowNotEnoughPoints = redemptionPrice && !hasEnoughPoints
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
<IconButton
|
<IconButton
|
||||||
@@ -229,7 +231,13 @@ export default function StandaloneHotelCardDialog({
|
|||||||
<HotelPointsRow pointsPerStay={redemptionPrice} />
|
<HotelPointsRow pointsPerStay={redemptionPrice} />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{hasEnoughPoints ? (
|
{shouldShowNotEnoughPoints ? (
|
||||||
|
<div className={styles.notEnoughPointsButton}>
|
||||||
|
<Typography variant="Body/Paragraph/mdBold">
|
||||||
|
<span>{notEnoughPointsLabel}</span>
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
<Button
|
<Button
|
||||||
asChild
|
asChild
|
||||||
theme="base"
|
theme="base"
|
||||||
@@ -257,12 +265,6 @@ export default function StandaloneHotelCardDialog({
|
|||||||
})}
|
})}
|
||||||
</Link>
|
</Link>
|
||||||
</Button>
|
</Button>
|
||||||
) : (
|
|
||||||
<div className={styles.notEnoughPointsButton}>
|
|
||||||
<Typography variant="Body/Paragraph/mdBold">
|
|
||||||
<span>{notEnoughPointsLabel}</span>
|
|
||||||
</Typography>
|
|
||||||
</div>
|
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
Reference in New Issue
Block a user