diff --git a/src/components/steps/BookingStep4.js b/src/components/steps/BookingStep4.js index 1926239..4d974f8 100644 --- a/src/components/steps/BookingStep4.js +++ b/src/components/steps/BookingStep4.js @@ -2,48 +2,57 @@ import { PAYMENT_METHODS } from "../../constants/bookingIndex"; import { useSelector } from 'react-redux'; export const BookingStep4 = () => { - // Redux store에서 데이터 가져오기 + // Redux store에서 모든 예약 데이터 가져오기 const { bookingData, bookingInfo, totalPrice } = useSelector(state => state.booking); // 시간 포맷팅 함수 const formatTime = (timeString) => { if (!timeString) return '-'; - return new Date(timeString).toLocaleTimeString('ko-KR', { + const date = new Date(timeString); + return date.toLocaleString('ko-KR', { + month: 'long', + day: 'numeric', hour: '2-digit', minute: '2-digit', hour12: false }); }; - // 디버깅용 콘솔 로그 - console.log('step4 bookingData : ', bookingData); - console.log('step4 bookingInfo : ', bookingInfo); - console.log('step4 totalPrice : ', totalPrice); - return (
공간: {bookingInfo?.title}
-날짜: {bookingData?.date}
-시간: {formatTime(bookingData?.start_time)} ~ {formatTime(bookingData?.end_time)}
-인원: {bookingData?.numberOfPeople}명
- {bookingData?.requirements && ( -요청사항: {bookingData.requirements}
- )} +주문번호: {bookingInfo?.orderNumber || '-'}
+날짜: {bookingData?.date || '-'}
+ {bookingData?.start_time && ( +시간: {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}
+결제 금액: {totalPrice?.toLocaleString()}원
-결제 수단: {PAYMENT_METHODS[bookingData?.paymentMethod]}
+결제 금액: {totalPrice?.toLocaleString()}원
+결제 수단: {PAYMENT_METHODS[bookingData?.paymentMethod]}
+결제 상태: 결제 완료
+