Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

feat: added loading spinners on product confirmation modal

=76e0238a59a9
diff --git a/frontend/src/pages/organization/BillingV2Page/components/AddProductModal.tsx b/frontend/src/pages/organization/BillingV2Page/components/AddProductModal.tsx
index 6e2da106ed..78e98963de 100644
--- a/frontend/src/pages/organization/BillingV2Page/components/AddProductModal.tsx
+++ b/frontend/src/pages/organization/BillingV2Page/components/AddProductModal.tsx
@@ -64,7 +64,7 @@ export const AddProductModal = ({ orgId, product, plan, cadence, onClose }: Prop
<AlertDialog
open
onOpenChange={(isOpen) => {
- if (!isOpen && !addProduct.isPending) {
+ if (!isOpen) {
onClose();
}
}}
diff --git a/frontend/src/pages/organization/BillingV2Page/components/RemoveProductModal.tsx b/frontend/src/pages/organization/BillingV2Page/components/RemoveProductModal.tsx
index 0720f0d2bb..b84b8712f4 100644
--- a/frontend/src/pages/organization/BillingV2Page/components/RemoveProductModal.tsx
+++ b/frontend/src/pages/organization/BillingV2Page/components/RemoveProductModal.tsx
@@ -63,7 +63,8 @@ export const RemoveProductModal = ({ orgId, product, onClose, onRemoved }: Props
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [orgId, product.id, isOnlyProduct]);
- const handleRemove = async () => {
+ const handleRemove = async (e: React.MouseEvent<HTMLButtonElement>) => {
+ e.preventDefault();
try {
await removeProduct.mutateAsync({ orgId, productId: product.id });
createNotification({
@@ -195,6 +196,7 @@ export const RemoveProductModal = ({ orgId, product, onClose, onRemoved }: Props
variant="danger"
isDisabled={removeProduct.isPending || previewLoading}
onClick={handleRemove}
+ isPending={removeProduct.isPending}
>
Remove {product.name}
</AlertDialogAction>