Merged in chore/move-enter-details (pull request #2778)
Chore/move enter details Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
"use client"
|
||||
|
||||
import { useEnterDetailsStore } from "../../../stores/enter-details"
|
||||
import { SidePanel } from "../../SidePanel"
|
||||
import SummaryUI from "./UI"
|
||||
|
||||
type Props = {
|
||||
isUserLoggedIn: boolean
|
||||
}
|
||||
|
||||
export default function DesktopSummary({ isUserLoggedIn }: Props) {
|
||||
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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user