Merged in feat/SW-1813 (pull request #1516)
Feat/SW-1813 * feat(SW-1652): handle linkedReservations fetching * feat: add linkedReservation retry functionality * chore: align naming * feat(SW-1813): Add booking confirmation PriceDetailsModal Approved-by: Simon.Emanuelsson
This commit is contained in:
@@ -4,9 +4,7 @@ import { useIntl } from "react-intl"
|
||||
|
||||
import { useBookingConfirmationStore } from "@/stores/booking-confirmation"
|
||||
|
||||
import { CreditCardAddIcon } from "@/components/Icons"
|
||||
import SkeletonShimmer from "@/components/SkeletonShimmer"
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
|
||||
import { formatPrice } from "@/utils/numberFormatting"
|
||||
@@ -16,10 +14,11 @@ import styles from "./paymentDetails.module.css"
|
||||
export default function PaymentDetails() {
|
||||
const intl = useIntl()
|
||||
|
||||
const rooms = useBookingConfirmationStore((state) => state.rooms)
|
||||
const currencyCode = useBookingConfirmationStore(
|
||||
(state) => state.currencyCode
|
||||
)
|
||||
const { rooms, currencyCode } = useBookingConfirmationStore((state) => ({
|
||||
rooms: state.rooms,
|
||||
currencyCode: state.currencyCode,
|
||||
}))
|
||||
|
||||
const hasAllRoomsLoaded = rooms.every((room) => room)
|
||||
const grandTotal = rooms.reduce((acc, room) => {
|
||||
const reservationTotalPrice = room?.totalPrice || 0
|
||||
@@ -45,17 +44,6 @@ export default function PaymentDetails() {
|
||||
<SkeletonShimmer width={"100%"} />
|
||||
)}
|
||||
</div>
|
||||
<Button
|
||||
className={styles.btn}
|
||||
intent="text"
|
||||
size="small"
|
||||
theme="base"
|
||||
variant="icon"
|
||||
wrapping
|
||||
>
|
||||
<CreditCardAddIcon />
|
||||
{intl.formatMessage({ id: "Save card to profile" })}
|
||||
</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user