Skip to content

Commit

Permalink
Merge pull request #60 from Spaces-Place/dusqo
Browse files Browse the repository at this point in the history
step4로 안가는 문제 해결중
  • Loading branch information
KangYeonbae authored Dec 5, 2024
2 parents 804da4b + 8d63162 commit 8531de8
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/pages/PaymentResult.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ const PaymentResult = () => {
navigate('/booking', {
state: {
paymentSuccess: true,
orderNumber: orderNumber
orderNumber: orderNumber,
bookingDetails: result.bookingDetails || {},
spaceId: result.spaceId,
spaceName: result.spaceName,
price: result.price
}
});
}, 1500);
Expand Down Expand Up @@ -70,8 +74,11 @@ const PaymentResult = () => {
};

useEffect(() => {
processPayment();
}, []); // eslint-disable-line react-hooks/exhaustive-deps
const paymentSuccess = location.state?.paymentSuccess;
if (paymentSuccess) {
setStep(4);
}
}, [location]);

return (
<div className="booking_payment-result">
Expand Down

0 comments on commit 8531de8

Please sign in to comment.