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({
|
||||
defaultMessage: "Not enough points",
|
||||
})
|
||||
const shouldShowNotEnoughPoints = redemptionPrice && !hasEnoughPoints
|
||||
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
@@ -216,7 +217,13 @@ export default function ListingHotelCardDialog({
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
{hasEnoughPoints ? (
|
||||
{shouldShowNotEnoughPoints ? (
|
||||
<div className={styles.notEnoughPointsButton}>
|
||||
<Typography variant="Body/Paragraph/mdBold">
|
||||
<span>{notEnoughPointsLabel}</span>
|
||||
</Typography>
|
||||
</div>
|
||||
) : (
|
||||
<Button
|
||||
asChild
|
||||
theme="base"
|
||||
@@ -233,12 +240,6 @@ export default function ListingHotelCardDialog({
|
||||
})}
|
||||
</Link>
|
||||
</Button>
|
||||
) : (
|
||||
<div className={styles.notEnoughPointsButton}>
|
||||
<Typography variant="Body/Paragraph/mdBold">
|
||||
<span>{notEnoughPointsLabel}</span>
|
||||
</Typography>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
) : (
|
||||
|
||||
@@ -63,6 +63,8 @@ export default function StandaloneHotelCardDialog({
|
||||
defaultMessage: "Not enough points",
|
||||
})
|
||||
|
||||
const shouldShowNotEnoughPoints = redemptionPrice && !hasEnoughPoints
|
||||
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<IconButton
|
||||
@@ -229,7 +231,13 @@ export default function StandaloneHotelCardDialog({
|
||||
<HotelPointsRow pointsPerStay={redemptionPrice} />
|
||||
)}
|
||||
</div>
|
||||
{hasEnoughPoints ? (
|
||||
{shouldShowNotEnoughPoints ? (
|
||||
<div className={styles.notEnoughPointsButton}>
|
||||
<Typography variant="Body/Paragraph/mdBold">
|
||||
<span>{notEnoughPointsLabel}</span>
|
||||
</Typography>
|
||||
</div>
|
||||
) : (
|
||||
<Button
|
||||
asChild
|
||||
theme="base"
|
||||
@@ -257,12 +265,6 @@ export default function StandaloneHotelCardDialog({
|
||||
})}
|
||||
</Link>
|
||||
</Button>
|
||||
) : (
|
||||
<div className={styles.notEnoughPointsButton}>
|
||||
<Typography variant="Body/Paragraph/mdBold">
|
||||
<span>{notEnoughPointsLabel}</span>
|
||||
</Typography>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user