From 3c9a2186eed279a50194dbdc1f66ef841f111332 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cosmin=20P=C3=A2rvulescu?= Date: Thu, 29 Feb 2024 16:43:57 +0200 Subject: [PATCH] Update redirect URL in billing and storage.ostrich components --- .../app/routes/apps/$clientId/billing.tsx | 2 +- .../routes/apps/$clientId/storage.ostrich.tsx | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/apps/console/app/routes/apps/$clientId/billing.tsx b/apps/console/app/routes/apps/$clientId/billing.tsx index 64b00136c..b474e8a9f 100644 --- a/apps/console/app/routes/apps/$clientId/billing.tsx +++ b/apps/console/app/routes/apps/$clientId/billing.tsx @@ -858,7 +858,7 @@ export default () => { isOpen={isCancelModalOpen} setIsOpen={setIsCancelModalOpen} clientID={appDetails.clientId!} - redirectURL={`/apps/${appDetails.clientId}/billing`} + redirectToAppBilling={true} /> )} {isSubscriptionModalOpen && ( diff --git a/apps/console/app/routes/apps/$clientId/storage.ostrich.tsx b/apps/console/app/routes/apps/$clientId/storage.ostrich.tsx index 396c16347..4a279899b 100644 --- a/apps/console/app/routes/apps/$clientId/storage.ostrich.tsx +++ b/apps/console/app/routes/apps/$clientId/storage.ostrich.tsx @@ -228,8 +228,8 @@ export const action: ActionFunction = getRollupReqFunctionErrorWrapper( }) } - if (fd.get('redirect_url')) { - return redirect(fd.get('redirect_url') as string) + if (fd.get('redirect_to_app_billing')) { + return redirect(`/apps/${clientId}/billing`) } return null @@ -240,12 +240,12 @@ export const ConfirmCancelModal = ({ isOpen, setIsOpen, clientID, - redirectURL, + redirectToAppBilling = false, }: { isOpen: boolean setIsOpen: (val: boolean) => void clientID: string - redirectURL?: string + redirectToAppBilling?: boolean }) => { const [confirmationText, setConfirmationText] = useState('') const transition = useTransition() @@ -283,8 +283,12 @@ export const ConfirmCancelModal = ({ }} > - {redirectURL && ( - + {redirectToAppBilling && ( + )}