Merged in feat/SW-3526-show-sas-eb-points-rate-in- (pull request #2933)

feat(SW-3526): Show EB points rate and label in booking flow

* feat(SW-3526): Show EB points rate and label in booking flow

* feat(SW-3526) Optimized points currency code

* feat(SW-3526) Removed extra multiplication for token expiry after rebase

* feat(SW-3526): Updated to exhaustive check and thow if type error

Approved-by: Anton Gunnarsson
This commit is contained in:
Hrishikesh Vaipurkar
2025-10-15 06:54:44 +00:00
parent 73af1eed9b
commit 78ede453a2
27 changed files with 281 additions and 176 deletions

View File

@@ -4,16 +4,19 @@ import Caption from '../../Caption'
import Subtitle from '../../Subtitle'
import styles from './hotelPointsRow.module.css'
import { CurrencyEnum } from '@scandic-hotels/common/constants/currency'
export type PointsRowProps = {
pointsPerStay: number
additionalPricePerStay?: number
additionalPriceCurrency?: string
pointsCurrency?: CurrencyEnum
}
export function HotelPointsRow({
pointsPerStay,
additionalPricePerStay,
additionalPriceCurrency,
pointsCurrency,
}: PointsRowProps) {
const intl = useIntl()
@@ -23,9 +26,10 @@ export function HotelPointsRow({
{pointsPerStay}
</Subtitle>
<Caption color="uiTextHighContrast">
{intl.formatMessage({
defaultMessage: 'Points',
})}
{pointsCurrency ??
intl.formatMessage({
defaultMessage: 'Points',
})}
</Caption>
{additionalPricePerStay ? (
<>