From a1f01b096bee446b190e376f5983c40459948109 Mon Sep 17 00:00:00 2001 From: Nalin Patidar Date: Wed, 22 Jan 2025 02:02:48 +0530 Subject: [PATCH] fix(ui): TE-XXXX create alert redirect modal persist fix --- .../create-alert-modal/create-alert-modal.component.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/thirdeye-ui/src/app/components/create-alert-modal/create-alert-modal.component.tsx b/thirdeye-ui/src/app/components/create-alert-modal/create-alert-modal.component.tsx index 75f2051b55..8c78910865 100644 --- a/thirdeye-ui/src/app/components/create-alert-modal/create-alert-modal.component.tsx +++ b/thirdeye-ui/src/app/components/create-alert-modal/create-alert-modal.component.tsx @@ -110,7 +110,9 @@ export const CreateAlertModal: FunctionComponent = okButtonText: t("label.confirm"), cancelButtonText: t("label.cancel"), onOk: () => checkQuota(), - keepDialogOnOk: true, + keepDialogOnOk: !!( + remainingQuota && remainingQuota?.detection <= 0 + ), }); } else { checkQuota();