Skip to content

Commit 93e7760

Browse files
feat: Added the navigation to Home Page on success or failed transaction
1 parent 0753441 commit 93e7760

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

apps/web/pages/payment-cancel/index.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ export default function PaymentCancel() {
1414
<PaymentSuccessConfirmationModal paymentStatus={CONSTANTS.PAYMENT_FAILED_CODE as 'failed'} />
1515
</Stack>
1616
),
17+
onClose: () => {
18+
if (typeof window !== 'undefined') {
19+
window.location.href = '/';
20+
}
21+
},
1722
});
1823
}, []);
1924

apps/web/pages/subscription_status/index.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ export default function SubscriptionStatus() {
2121
<PaymentSuccessConfirmationModal paymentStatus={CONSTANTS.PAYMENT_SUCCCESS_CODE as 'failed'} />
2222
</Stack>
2323
),
24+
onClose: () => {
25+
if (typeof window !== 'undefined') {
26+
window.location.href = '/';
27+
}
28+
},
2429
});
2530
}, []);
2631

0 commit comments

Comments
 (0)