Chore/SW-2878 extract booking confirmation pag * chore(SW-2878): Moved booking confirmation page to booking-flow package * chore(SW-2878): Fixed promo styles as per design * chore(SW-2878): Kept tiny duplicate function to avoid export from booking-flow package Approved-by: Anton Gunnarsson
39 lines
1.0 KiB
TypeScript
39 lines
1.0 KiB
TypeScript
"use client"
|
|
|
|
import { SidePanel } from "@scandic-hotels/booking-flow/components/SidePanel"
|
|
|
|
import { useEnterDetailsStore } from "@/stores/enter-details"
|
|
|
|
import SummaryUI from "./UI"
|
|
|
|
import type { SummaryProps } from "@/types/components/hotelReservation/summary"
|
|
|
|
export default function DesktopSummary({ isUserLoggedIn }: SummaryProps) {
|
|
const toggleSummaryOpen = useEnterDetailsStore(
|
|
(state) => state.actions.toggleSummaryOpen
|
|
)
|
|
|
|
const { booking, rooms, totalPrice, vat, defaultCurrency } =
|
|
useEnterDetailsStore((state) => ({
|
|
booking: state.booking,
|
|
rooms: state.rooms,
|
|
totalPrice: state.totalPrice,
|
|
vat: state.vat,
|
|
defaultCurrency: state.defaultCurrency,
|
|
}))
|
|
|
|
return (
|
|
<SidePanel variant="summary">
|
|
<SummaryUI
|
|
booking={booking}
|
|
rooms={rooms}
|
|
isUserLoggedIn={isUserLoggedIn}
|
|
totalPrice={totalPrice}
|
|
vat={vat}
|
|
toggleSummaryOpen={toggleSummaryOpen}
|
|
defaultCurrency={defaultCurrency}
|
|
/>
|
|
</SidePanel>
|
|
)
|
|
}
|