feat: SW-2028 Fixed review comments
This commit is contained in:
@@ -26,6 +26,8 @@ import Total from "./Total"
|
||||
|
||||
import styles from "./receipt.module.css"
|
||||
|
||||
import { CurrencyEnum } from "@/types/enums/currency"
|
||||
|
||||
export async function Receipt({ refId }: { refId: string }) {
|
||||
const value = decrypt(refId)
|
||||
if (!value) {
|
||||
@@ -52,10 +54,12 @@ export async function Receipt({ refId }: { refId: string }) {
|
||||
})
|
||||
|
||||
const currency =
|
||||
booking.currencyCode !== "Points"
|
||||
booking.currencyCode !== CurrencyEnum.POINTS
|
||||
? booking.currencyCode
|
||||
: (booking.ancillaries.find((a) => a.currency !== "Points")?.currency ??
|
||||
booking.packages.find((p) => p.currency !== "Points")?.currency)
|
||||
: (booking.ancillaries.find((a) => a.currency !== CurrencyEnum.POINTS)
|
||||
?.currency ??
|
||||
booking.packages.find((p) => p.currency !== CurrencyEnum.POINTS)
|
||||
?.currency)
|
||||
|
||||
return (
|
||||
<main className={styles.main}>
|
||||
|
||||
Reference in New Issue
Block a user