fix(SW-3616): Handle EuroBonus point type everywhere * Add tests to formatPrice * formatPrice * More work replacing config with api points type * More work replacing config with api points type * More fixing with currency * maybe actually fixed it * Fix MyStay * Clean up * Fix comments * Merge branch 'master' into fix/refactor-currency-display * Fix calculateTotalPrice for EB points + SF points + cash Approved-by: Joakim Jäderberg
22 lines
541 B
TypeScript
22 lines
541 B
TypeScript
"use client"
|
|
|
|
import { useMyStayStore } from "@/stores/my-stay"
|
|
|
|
import Price from "../PriceType/Price"
|
|
|
|
import type { PriceType as _PriceType } from "@/types/components/hotelReservation/myStay/myStay"
|
|
|
|
export default function TotalPrice() {
|
|
const { bookedRoom, totalPrice } = useMyStayStore((state) => ({
|
|
bookedRoom: state.bookedRoom,
|
|
totalPrice: state.totalPrice,
|
|
}))
|
|
return (
|
|
<Price
|
|
isCancelled={bookedRoom.isCancelled}
|
|
isMember={bookedRoom.rateDefinition.isMemberRate}
|
|
price={totalPrice}
|
|
/>
|
|
)
|
|
}
|