diff --git a/src/components/steps/BookingStep4.js b/src/components/steps/BookingStep4.js index 8ccf57a..38f1db4 100644 --- a/src/components/steps/BookingStep4.js +++ b/src/components/steps/BookingStep4.js @@ -1,6 +1,6 @@ import { PAYMENT_METHODS } from "../../constants/bookingIndex"; -export const BookingStep4 = ({ bookingData, bookingInfo, price }) => { +export const BookingStep4 = ({ bookingData, bookingInfo, price, totalprice, spaceName }) => { // 시간 포맷팅 함수 const formatTime = (timeString) => { return new Date(timeString).toLocaleTimeString('ko-KR', { @@ -10,8 +10,11 @@ export const BookingStep4 = ({ bookingData, bookingInfo, price }) => { }); }; - // reservationInfo와 spaceInfo를 bookingData, bookingInfo에서 분리 - const { spaceInfo, reservationInfo } = bookingData || {}; + console.log(bookingData, spaceName) + console.log(bookingInfo) + console.log(price, totalprice) + + return (
@@ -19,27 +22,24 @@ export const BookingStep4 = ({ bookingData, bookingInfo, price }) => {

예약정보

-

공간: {spaceInfo?.title}

- {reservationInfo?.date ? ( -

날짜: {reservationInfo.date}

- ) : ( -

시간: {formatTime(reservationInfo?.start_time)} ~ {formatTime(reservationInfo?.end_time)}

- )} -

인원: {reservationInfo?.numberOfPeople}명

- {reservationInfo?.requirements && ( -

요청사항: {reservationInfo.requirements}

+

공간: {spaceName}

+

날짜: {bookingData.date}

+

시간: {formatTime(bookingData.start_time)} ~ {formatTime(bookingData.end_time)}

+

인원: {bookingData.numberOfPeople}명

+ {bookingData.requirements && ( +

요청사항: {bookingData.requirements}

)}

예약자 정보

-

이름: {bookingData?.name}

-

연락처: {bookingData?.phone}

-

이메일: {bookingData?.email}

+

이름: {bookingData.name}

+

연락처: {bookingData.phone}

+

이메일: {bookingData.email}

결제 정보

-

결제 금액: {price?.toLocaleString()}원

-

결제 수단: {PAYMENT_METHODS[reservationInfo?.paymentMethod]}

+

결제 금액: {price.toLocaleString()}원

+

결제 수단: {PAYMENT_METHODS[bookingData.paymentMethod]}

diff --git a/src/pages/booking.js b/src/pages/booking.js index bd74aa7..1f96f91 100644 --- a/src/pages/booking.js +++ b/src/pages/booking.js @@ -155,7 +155,9 @@ return ( )}