diff --git a/apps/scandic-web/components/HotelReservation/MyStay/BookingSummary/index.tsx b/apps/scandic-web/components/HotelReservation/MyStay/BookingSummary/index.tsx index 7348814de..283be63c0 100644 --- a/apps/scandic-web/components/HotelReservation/MyStay/BookingSummary/index.tsx +++ b/apps/scandic-web/components/HotelReservation/MyStay/BookingSummary/index.tsx @@ -5,15 +5,9 @@ import { useIntl } from "react-intl" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import { Typography } from "@scandic-hotels/design-system/Typography" -import { dt } from "@/lib/dt" -import { useMyStayRoomDetailsStore } from "@/stores/my-stay/myStayRoomDetailsStore" - -import IconChip from "@/components/TempDesignSystem/IconChip" import { Toast } from "@/components/TempDesignSystem/Toasts" -import useLang from "@/hooks/useLang" import { trackMyStayPageLink } from "@/utils/tracking" -import TotalPrice from "../Rooms/TotalPrice" import SummaryCard from "./SummaryCard" import styles from "./bookingSummary.module.css" @@ -26,91 +20,17 @@ interface BookingSummaryProps { export default function BookingSummary({ hotel }: BookingSummaryProps) { const intl = useIntl() - const lang = useLang() - - const bookedRoom = useMyStayRoomDetailsStore((state) => state.bookedRoom) - - const { isCancelled, createDateTime, guaranteeInfo, priceType } = bookedRoom const directionsUrl = `https://www.google.com/maps/dir/?api=1&destination=${hotel.location.latitude},${hotel.location.longitude}` - const bookingDate = dt(createDateTime).locale(lang).format("D MMMM YYYY") - - const isPaid = !!guaranteeInfo - - const paymentMethod = guaranteeInfo?.paymentMethodDescription - ?.toLocaleLowerCase() - .startsWith("visa") - ? intl.formatMessage({ id: "Card" }) - : guaranteeInfo?.paymentMethodDescription - ? guaranteeInfo?.paymentMethodDescription - : intl.formatMessage({ id: "N/A" }) - return (

- {intl.formatMessage({ id: "Booking summary" })} + {intl.formatMessage({ id: "Practical information" })}

- - } - image={{ - src: "/_static/img/scandic-coin.svg", - alt: "Scandic coin", - }} - texts={[`${intl.formatMessage({ id: "Payment" })}: ${paymentMethod}`]} - supportingText={bookingDate} - chip={ - isCancelled ? ( - - } - > - - {intl.formatMessage({ id: "Cancelled" })} - - - ) : ( - - ) : ( - - ) - } - > - - - {intl.formatMessage({ id: "Status" })}:{" "} - {isPaid - ? intl.formatMessage({ id: "Paid" }) - : intl.formatMessage({ id: "Unpaid" })} - - - - ) - } - />