fix(STAY-23): don't strikethrough price if only one room is cancelled (multiroom) * fix(STAY-23): don't strikethrough price if only room is cancelled (multiroom) Approved-by: Anton Gunnarsson
24 lines
534 B
TypeScript
24 lines
534 B
TypeScript
"use client"
|
|
|
|
import { useMyStayStore } from "@/stores/my-stay"
|
|
|
|
import Price from "../PriceType/Price"
|
|
|
|
export default function TotalPrice() {
|
|
const { bookedRoom, totalPrice, allRoomsAreCancelled } = useMyStayStore(
|
|
(state) => ({
|
|
bookedRoom: state.bookedRoom,
|
|
totalPrice: state.totalPrice,
|
|
allRoomsAreCancelled: state.allRoomsAreCancelled,
|
|
})
|
|
)
|
|
|
|
return (
|
|
<Price
|
|
isCancelled={allRoomsAreCancelled}
|
|
isMember={bookedRoom.rateDefinition.isMemberRate}
|
|
price={totalPrice}
|
|
/>
|
|
)
|
|
}
|