Files
web/apps/scandic-web/components/HotelReservation/MyStay/Rooms/TotalPrice.tsx
Matilda Landström d6b94376b0 Merged in fix/STAY-23-room-price (pull request #3529)
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
2026-02-03 07:58:52 +00:00

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}
/>
)
}