Skip to content

Commit

Permalink
bookingStep4에 맞줘 pymentresult 내용변경
Browse files Browse the repository at this point in the history
  • Loading branch information
KangYeonbae committed Dec 5, 2024
1 parent becdb41 commit 54dcaf5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/steps/BookingStep4.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const BookingStep4 = ({ bookingData, bookingInfo, price }) => {
});
};

// reservationInfo와 spaceInfo를 bookingData, bookingInfo에서 분리
const { spaceInfo, reservationInfo } = bookingData || {};

return (
Expand Down
7 changes: 6 additions & 1 deletion src/pages/PaymentResult.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React, { useEffect, useState } from 'react';
import { useSearchParams, useNavigate } from 'react-router-dom';
import { handlePaymentResult } from '../utils/paymentService';


export default function PaymentResult() {
const [searchParams] = useSearchParams();
const navigate = useNavigate();
Expand All @@ -27,7 +28,11 @@ export default function PaymentResult() {
state: {
paymentSuccess: true,
orderNumber,
bookingDetails: savedBookingData.bookingData,
bookingData: {
...savedBookingData.bookingData,
spaceInfo: savedBookingData.spaceInfo,
reservationInfo: savedBookingData.reservationInfo
},
bookingInfo: savedBookingData.bookingInfo,
price: savedBookingData.totalPrice,
...result
Expand Down

0 comments on commit 54dcaf5

Please sign in to comment.