This commit is contained in:
archer 2025-12-24 15:21:03 +08:00
parent dadb994628
commit d647543d32
No known key found for this signature in database
GPG Key ID: 4446499B846D4A9E

View File

@ -57,6 +57,16 @@ const PriceBox = () => {
};
}, [teamSubPlan?.standard?.teamId]);
const handleBack = () => {
// Check if there is history to go back to
if (window.history.length > 1) {
router.back();
} else {
// No history, navigate to home page
router.push('/dashboard/agent');
}
};
const onPaySuccess = () => {
setTimeout(() => {
router.reload();
@ -81,7 +91,7 @@ const PriceBox = () => {
variant={'transparentBase'}
color={'primary.700'}
leftIcon={<MyIcon name={'core/workflow/undo'} w={4} />}
onClick={() => router.back()}
onClick={handleBack}
alignSelf={'flex-start'}
mt={-8}
>
@ -98,7 +108,7 @@ const PriceBox = () => {
w={9}
h={9}
icon={<MyIcon name={'core/workflow/undo'} w={4} />}
onClick={() => router.back()}
onClick={handleBack}
/>
)}