Skip to content

Commit

Permalink
Merge pull request #291 from Together-3team/feat/payment
Browse files Browse the repository at this point in the history
[지원] 리렌더링 2가지 분류
  • Loading branch information
seolsis authored Jun 25, 2024
2 parents d387754 + 293a242 commit 3f35431
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pages/payment/PaymentSuccessByWith.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
flex-direction: column;
padding: 19.2rem 6.6rem 22rem 6.7rem;
gap: 3rem;
justify-content: center;
align-items: center;
}

.warning {
Expand Down
9 changes: 9 additions & 0 deletions src/pages/payment/paymentSuccess.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ export default function PaymentSuccess() {
}
};
sendPaymentData();
const timer = setTimeout(() => {
if (gbi) {
router.push('/payment/paymentSuccessByWith');
} else {
router.push('/payment/paymentSuccessByCart');
}
}, 2000);

return () => clearTimeout(timer);
}, [paymentKey, orderId, amount]);

return (
Expand Down

0 comments on commit 3f35431

Please sign in to comment.