Skip to content

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

improvement(ui): use AlertDialog isPending for typed confirmations and drop DeleteConfirmDialog alias (#8857)

Andrew Huang41cf3e4c6ec1
diff --git a/frontend/src/components/COMPONENT_LIFECYCLE.md b/frontend/src/components/COMPONENT_LIFECYCLE.md
index 70bee05ea6..ff49944c2d 100644
--- a/frontend/src/components/COMPONENT_LIFECYCLE.md
+++ b/frontend/src/components/COMPONENT_LIFECYCLE.md
@@ -26,7 +26,6 @@ The 2026-10-04 source audit found no external consumers of `Blur`, `CreatableSel
| Components | Status | Direction |
| ------------------------------ | ---------- | --------------------------------------------------------------------- |
| `PageHeader` | Supported | Owns the normal 40px bottom boundary (`mb-10`). Remove header-boundary parent gaps and redundant caller margins when adopting it; preserve independent body/card spacing in body containers. `className` supports intentional compact/responsive boundaries. See its spacing stories. |
-| `DeleteConfirmDialog` | Deprecated | Renamed to `ConfirmationAlertDialog`, which also covers non-delete confirms. The alias stays only so in-flight branches compile; remove it once no import remains. |
| `ReactSelect/FilterableSelect` | Deprecated | Use `Combobox`; keep compatibility available while consumers migrate. |
| `ReactSelect/CreatableSelect` | Deprecated | Use `Combobox` with inline `creation` for values needing no metadata, or dialog `creation` for caller-owned forms and persistence. Keep compatibility for react-select-specific component overrides; migrate consumers separately. |
diff --git a/frontend/src/components/assume-privileges/AssumePrivilegesDialog.tsx b/frontend/src/components/assume-privileges/AssumePrivilegesDialog.tsx
index 639b7a5d0b..0ac08a8542 100644
--- a/frontend/src/components/assume-privileges/AssumePrivilegesDialog.tsx
+++ b/frontend/src/components/assume-privileges/AssumePrivilegesDialog.tsx
@@ -62,11 +62,10 @@ export const AssumePrivilegesDialog = ({ isOpen, onOpenChange, actorType, actorI
return (
<AlertDialog
+ isPending={assumePrivileges.isPending}
open={isOpen}
confirmationValue={CONFIRM_KEY}
- onOpenChange={(open) => {
- if (!assumePrivileges.isPending) onOpenChange(open);
- }}
+ onOpenChange={onOpenChange}
>
<AlertDialogContent>
<AlertDialogHeader>
@@ -84,10 +83,9 @@ export const AssumePrivilegesDialog = ({ isOpen, onOpenChange, actorType, actorI
onConfirm={handleConfirm}
/>
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={assumePrivileges.isPending}>Cancel</AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="project"
- isPending={assumePrivileges.isPending}
isDisabled={isActionDisabled}
onClick={(event) => {
event.preventDefault();
diff --git a/frontend/src/components/honey-tokens/DeleteHoneyTokenModal.tsx b/frontend/src/components/honey-tokens/DeleteHoneyTokenModal.tsx
index 2247dddcf8..87f0cf4923 100644
--- a/frontend/src/components/honey-tokens/DeleteHoneyTokenModal.tsx
+++ b/frontend/src/components/honey-tokens/DeleteHoneyTokenModal.tsx
@@ -39,7 +39,12 @@ export const DeleteHoneyTokenModal = ({ isOpen, onOpenChange, honeyToken }: Prop
};
return (
- <AlertDialog open={isOpen} confirmationValue={honeyToken.name} onOpenChange={onOpenChange}>
+ <AlertDialog
+ isPending={revokeHoneyToken.isPending}
+ open={isOpen}
+ confirmationValue={honeyToken.name}
+ onOpenChange={onOpenChange}
+ >
<AlertDialogContent className="sm:max-w-xl!">
<AlertDialogHeader>
<AlertDialogTitle>Are you sure you want to delete {honeyToken.name}?</AlertDialogTitle>
@@ -50,17 +55,16 @@ export const DeleteHoneyTokenModal = ({ isOpen, onOpenChange, honeyToken }: Prop
</AlertDialogHeader>
<AlertDialogConfirmationField
onConfirm={() => {
- if (!revokeHoneyToken.isPending) handleDelete().catch(() => undefined);
+ handleDelete().catch(() => undefined);
}}
/>
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={revokeHoneyToken.isPending}>Cancel</AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="danger"
- isPending={revokeHoneyToken.isPending}
onClick={(event) => {
event.preventDefault();
- if (!revokeHoneyToken.isPending) handleDelete().catch(() => undefined);
+ handleDelete().catch(() => undefined);
}}
>
Delete
diff --git a/frontend/src/components/honey-tokens/HoneyTokenDetailsDrawer.tsx b/frontend/src/components/honey-tokens/HoneyTokenDetailsDrawer.tsx
index c2cf79304d..0d8c568fa1 100644
--- a/frontend/src/components/honey-tokens/HoneyTokenDetailsDrawer.tsx
+++ b/frontend/src/components/honey-tokens/HoneyTokenDetailsDrawer.tsx
@@ -340,6 +340,7 @@ const HoneyTokenDetailsContent = ({
</AlertDialogContent>
</AlertDialog>
<AlertDialog
+ isPending={isRevoking}
open={isRevokeOpen}
confirmationValue={honeyToken.name}
onOpenChange={setIsRevokeOpen}
@@ -359,17 +360,16 @@ const HoneyTokenDetailsContent = ({
</AlertDialogHeader>
<AlertDialogConfirmationField
onConfirm={() => {
- if (!isRevoking) handleRevoke().catch(() => undefined);
+ handleRevoke().catch(() => undefined);
}}
/>
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={isRevoking}>Cancel</AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="danger"
- isPending={isRevoking}
onClick={(event) => {
event.preventDefault();
- if (!isRevoking) handleRevoke().catch(() => undefined);
+ handleRevoke().catch(() => undefined);
}}
>
Revoke
diff --git a/frontend/src/components/honey-tokens/RevokeHoneyTokenModal.tsx b/frontend/src/components/honey-tokens/RevokeHoneyTokenModal.tsx
index 379861539f..49c270fb67 100644
--- a/frontend/src/components/honey-tokens/RevokeHoneyTokenModal.tsx
+++ b/frontend/src/components/honey-tokens/RevokeHoneyTokenModal.tsx
@@ -41,7 +41,12 @@ export const RevokeHoneyTokenModal = ({ isOpen, onOpenChange, honeyToken }: Prop
};
return (
- <AlertDialog open={isOpen} confirmationValue={honeyToken.name} onOpenChange={onOpenChange}>
+ <AlertDialog
+ isPending={revokeHoneyToken.isPending}
+ open={isOpen}
+ confirmationValue={honeyToken.name}
+ onOpenChange={onOpenChange}
+ >
<AlertDialogContent className="sm:max-w-xl!">
<AlertDialogHeader>
<AlertDialogTitle>Are you sure you want to revoke {honeyToken.name}?</AlertDialogTitle>
@@ -57,17 +62,16 @@ export const RevokeHoneyTokenModal = ({ isOpen, onOpenChange, honeyToken }: Prop
</AlertDialogHeader>
<AlertDialogConfirmationField
onConfirm={() => {
- if (!revokeHoneyToken.isPending) handleRevoke().catch(() => undefined);
+ handleRevoke().catch(() => undefined);
}}
/>
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={revokeHoneyToken.isPending}>Cancel</AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="danger"
- isPending={revokeHoneyToken.isPending}
onClick={(event) => {
event.preventDefault();
- if (!revokeHoneyToken.isPending) handleRevoke().catch(() => undefined);
+ handleRevoke().catch(() => undefined);
}}
>
Revoke
diff --git a/frontend/src/components/secret-scanning/DeleteSecretScanningDataSourceModal.tsx b/frontend/src/components/secret-scanning/DeleteSecretScanningDataSourceModal.tsx
index 676fe0eb6a..47daa74647 100644
--- a/frontend/src/components/secret-scanning/DeleteSecretScanningDataSourceModal.tsx
+++ b/frontend/src/components/secret-scanning/DeleteSecretScanningDataSourceModal.tsx
@@ -1,5 +1,5 @@
import { createNotification } from "@app/components/notifications";
-import { Alert, AlertDescription, DeleteConfirmDialog } from "@app/components/v3";
+import { Alert, AlertDescription, ConfirmationAlertDialog } from "@app/components/v3";
import { SECRET_SCANNING_DATA_SOURCE_MAP } from "@app/helpers/secretScanningV2";
import {
TSecretScanningDataSource,
@@ -44,7 +44,7 @@ export const DeleteSecretScanningDataSourceModal = ({
};
return (
- <DeleteConfirmDialog
+ <ConfirmationAlertDialog
isOpen={isOpen}
onOpenChange={onOpenChange}
title={`Delete ${name}?`}
diff --git a/frontend/src/components/secret-syncs/DeleteSecretSyncModal.tsx b/frontend/src/components/secret-syncs/DeleteSecretSyncModal.tsx
index baf89801a8..8d57a1f203 100644
--- a/frontend/src/components/secret-syncs/DeleteSecretSyncModal.tsx
+++ b/frontend/src/components/secret-syncs/DeleteSecretSyncModal.tsx
@@ -61,7 +61,12 @@ export const DeleteSecretSyncModal = ({ isOpen, onOpenChange, secretSync, onComp
};
return (
- <AlertDialog open={isOpen} confirmationValue={name} onOpenChange={onOpenChange}>
+ <AlertDialog
+ isPending={deleteSync.isPending}
+ open={isOpen}
+ confirmationValue={name}
+ onOpenChange={onOpenChange}
+ >
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Are you sure you want to delete {name}?</AlertDialogTitle>
@@ -73,7 +78,7 @@ export const DeleteSecretSyncModal = ({ isOpen, onOpenChange, secretSync, onComp
</AlertDialogHeader>
<AlertDialogConfirmationField
onConfirm={() => {
- if (!deleteSync.isPending) handleDeleteSecretSync().catch(() => undefined);
+ handleDeleteSecretSync().catch(() => undefined);
}}
/>
{syncOption?.canRemoveSecretsOnDeletion && (
@@ -93,13 +98,12 @@ export const DeleteSecretSyncModal = ({ isOpen, onOpenChange, secretSync, onComp
</Field>
)}
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={deleteSync.isPending}>Cancel</AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="danger"
- isPending={deleteSync.isPending}
onClick={(event) => {
event.preventDefault();
- if (!deleteSync.isPending) handleDeleteSecretSync().catch(() => undefined);
+ handleDeleteSecretSync().catch(() => undefined);
}}
>
Delete
diff --git a/frontend/src/components/secrets/CommitHistorySheet/CommitDetailsView.tsx b/frontend/src/components/secrets/CommitHistorySheet/CommitDetailsView.tsx
index c65d94839f..c7eaa13d04 100644
--- a/frontend/src/components/secrets/CommitHistorySheet/CommitDetailsView.tsx
+++ b/frontend/src/components/secrets/CommitHistorySheet/CommitDetailsView.tsx
@@ -348,6 +348,7 @@ export const CommitDetailsView = ({
</div>
<AlertDialog
+ isPending={isReverting}
open={isRevertOpen}
confirmationValue={REVERT_CONFIRM_KEY}
onOpenChange={setIsRevertOpen}
@@ -360,13 +361,11 @@ export const CommitDetailsView = ({
resources it touched.
</AlertDialogDescription>
</AlertDialogHeader>
- <AlertDialogConfirmationField inputProps={{ disabled: isReverting }} />
+ <AlertDialogConfirmationField />
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={isReverting}>Cancel</AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="danger"
- isDisabled={isReverting}
- isPending={isReverting}
onClick={(event) => {
event.preventDefault();
handleRevert();
diff --git a/frontend/src/components/v3/platform/ConfirmationAlertDialog/ConfirmationAlertDialog.tsx b/frontend/src/components/v3/platform/ConfirmationAlertDialog/ConfirmationAlertDialog.tsx
index 3e4104f28f..2bf564bb76 100644
--- a/frontend/src/components/v3/platform/ConfirmationAlertDialog/ConfirmationAlertDialog.tsx
+++ b/frontend/src/components/v3/platform/ConfirmationAlertDialog/ConfirmationAlertDialog.tsx
@@ -90,9 +90,3 @@ export const ConfirmationAlertDialog = ({
</AlertDialog>
);
};
-
-/**
- * @deprecated Renamed to `ConfirmationAlertDialog`. Kept so in-flight branches keep compiling;
- * import `ConfirmationAlertDialog` instead.
- */
-export const DeleteConfirmDialog = ConfirmationAlertDialog;
diff --git a/frontend/src/pages/admin/components/ConfirmActionDialog.tsx b/frontend/src/pages/admin/components/ConfirmActionDialog.tsx
index e338d58364..36dffb393b 100644
--- a/frontend/src/pages/admin/components/ConfirmActionDialog.tsx
+++ b/frontend/src/pages/admin/components/ConfirmActionDialog.tsx
@@ -51,12 +51,10 @@ export const ConfirmActionDialog = ({
return (
<AlertDialog
+ isPending={isPending}
open={isOpen}
confirmationValue={confirmationKey}
- onOpenChange={(open) => {
- if (isPending && !open) return;
- onOpenChange(open);
- }}
+ onOpenChange={onOpenChange}
>
<AlertDialogContent>
<AlertDialogHeader>
@@ -74,10 +72,9 @@ export const ConfirmActionDialog = ({
/>
{children}
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={isPending}>Cancel</AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="danger"
- isPending={isPending}
onClick={(event) => {
event.preventDefault();
handleConfirm().catch(() => undefined);
diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/DeleteAppConnectionModal.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/DeleteAppConnectionModal.tsx
index 8e1e06cd45..53a71d230f 100644
--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/DeleteAppConnectionModal.tsx
+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/DeleteAppConnectionModal.tsx
@@ -50,7 +50,12 @@ export const DeleteAppConnectionModal = ({ isOpen, onOpenChange, appConnection }
};
return (
- <AlertDialog open={isOpen} confirmationValue={name} onOpenChange={onOpenChange}>
+ <AlertDialog
+ isPending={deleteAppConnection.isPending}
+ open={isOpen}
+ confirmationValue={name}
+ onOpenChange={onOpenChange}
+ >
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Are you sure you want to delete {name}?</AlertDialogTitle>
@@ -71,21 +76,16 @@ export const DeleteAppConnectionModal = ({ isOpen, onOpenChange, appConnection }
)}
<AlertDialogConfirmationField
onConfirm={() => {
- if (!deleteAppConnection.isPending) {
- handleDeleteAppConnection().catch(() => undefined);
- }
+ handleDeleteAppConnection().catch(() => undefined);
}}
/>
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={deleteAppConnection.isPending}>Cancel</AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="danger"
- isPending={deleteAppConnection.isPending}
onClick={(event) => {
event.preventDefault();
- if (!deleteAppConnection.isPending) {
- handleDeleteAppConnection().catch(() => undefined);
- }
+ handleDeleteAppConnection().catch(() => undefined);
}}
>
Delete
diff --git a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityProjectsSection.tsx b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityProjectsSection.tsx
index ddf12d1eff..26c8ace212 100644
--- a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityProjectsSection.tsx
+++ b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityProjectsSection.tsx
@@ -96,10 +96,10 @@ export const IdentityProjectsSection = ({ identityId }: Props) => {
</CardContent>
</Card>
<AlertDialog
+ isPending={isRemoving}
open={popUp.removeIdentityFromProject.isOpen}
confirmationValue="confirm"
onOpenChange={(isOpen) => {
- if (!isOpen && isRemoving) return;
handlePopUpToggle("removeIdentityFromProject", isOpen);
}}
>
@@ -119,14 +119,12 @@ export const IdentityProjectsSection = ({ identityId }: Props) => {
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogConfirmationField
- inputProps={{ disabled: isRemoving }}
onConfirm={() => onRemoveIdentitySubmit().catch(() => undefined)}
/>
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={isRemoving}>Cancel</AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="danger"
- isPending={isRemoving}
onClick={(event) => {
event.preventDefault();
onRemoveIdentitySubmit().catch(() => undefined);
diff --git a/frontend/src/pages/organization/NetworkingPage/GatewayDetailsByIDPage/components/GatewayPageHeader/GatewayPageHeader.tsx b/frontend/src/pages/organization/NetworkingPage/GatewayDetailsByIDPage/components/GatewayPageHeader/GatewayPageHeader.tsx
index 21d12ca1d0..54f170586e 100644
--- a/frontend/src/pages/organization/NetworkingPage/GatewayDetailsByIDPage/components/GatewayPageHeader/GatewayPageHeader.tsx
+++ b/frontend/src/pages/organization/NetworkingPage/GatewayDetailsByIDPage/components/GatewayPageHeader/GatewayPageHeader.tsx
@@ -176,6 +176,7 @@ export const GatewayPageHeader = ({ gateway, orgId }: { gateway: TGatewayV2; org
/>
<AlertDialog
+ isPending={isDeleting}
open={popUp.deleteGateway.isOpen}
confirmationValue={gateway.name}
onOpenChange={(open) => handlePopUpToggle("deleteGateway", open)}
@@ -192,10 +193,9 @@ export const GatewayPageHeader = ({ gateway, orgId }: { gateway: TGatewayV2; org
<AlertDescription>Deleting this gateway cannot be undone.</AlertDescription>
</Alert>
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={isDeleting}>Cancel</AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="danger"
- isPending={isDeleting}
onClick={(event) => {
event.preventDefault();
onDelete();
@@ -207,6 +207,7 @@ export const GatewayPageHeader = ({ gateway, orgId }: { gateway: TGatewayV2; org
</AlertDialogContent>
</AlertDialog>
<AlertDialog
+ isPending={isRevoking}
open={popUp.revokeGateway.isOpen}
confirmationValue={gateway.name}
onOpenChange={(open) => handlePopUpToggle("revokeGateway", open)}
@@ -221,10 +222,9 @@ export const GatewayPageHeader = ({ gateway, orgId }: { gateway: TGatewayV2; org
</AlertDialogHeader>
<AlertDialogConfirmationField inputProps={{ placeholder: gateway.name }} />
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={isRevoking}>Cancel</AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="danger"
- isPending={isRevoking}
onClick={(event) => {
event.preventDefault();
onRevoke();
diff --git a/frontend/src/pages/organization/NetworkingPage/RelayDetailsByIDPage/components/RelayPageHeader/RelayPageHeader.tsx b/frontend/src/pages/organization/NetworkingPage/RelayDetailsByIDPage/components/RelayPageHeader/RelayPageHeader.tsx
index 228bab8c03..974dd23957 100644
--- a/frontend/src/pages/organization/NetworkingPage/RelayDetailsByIDPage/components/RelayPageHeader/RelayPageHeader.tsx
+++ b/frontend/src/pages/organization/NetworkingPage/RelayDetailsByIDPage/components/RelayPageHeader/RelayPageHeader.tsx
@@ -132,6 +132,7 @@ export const RelayPageHeader = ({
</PageHeader>
<AlertDialog
+ isPending={isDeleting}
open={popUp.deleteRelay.isOpen}
confirmationValue={relay.name}
onOpenChange={(open) => handlePopUpToggle("deleteRelay", open)}
@@ -148,10 +149,9 @@ export const RelayPageHeader = ({
<AlertDescription>Deleting this relay cannot be undone.</AlertDescription>
</Alert>
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={isDeleting}>Cancel</AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="danger"
- isPending={isDeleting}
onClick={(event) => {
event.preventDefault();
onDelete();
@@ -163,6 +163,7 @@ export const RelayPageHeader = ({
</AlertDialogContent>
</AlertDialog>
<AlertDialog
+ isPending={isRevoking}
open={popUp.revokeRelay.isOpen}
confirmationValue={relay.name}
onOpenChange={(open) => handlePopUpToggle("revokeRelay", open)}
@@ -177,10 +178,9 @@ export const RelayPageHeader = ({
</AlertDialogHeader>
<AlertDialogConfirmationField inputProps={{ placeholder: relay.name }} />
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={isRevoking}>Cancel</AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="danger"
- isPending={isRevoking}
onClick={(event) => {
event.preventDefault();
onRevoke();
diff --git a/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/GatewayTab.tsx b/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/GatewayTab.tsx
index a07ec503eb..e9945456db 100644
--- a/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/GatewayTab.tsx
+++ b/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/GatewayTab.tsx
@@ -464,6 +464,7 @@ export const GatewayTab = withPermission(
/>
)}
<AlertDialog
+ isPending={deleteGatewayV2ById.isPending}
open={popUp.deleteGateway.isOpen}
confirmationValue={
(popUp.deleteGateway.data as { name?: string })?.name || "gateway"
@@ -487,12 +488,9 @@ export const GatewayTab = withPermission(
<AlertDescription>Deleting this gateway cannot be undone.</AlertDescription>
</Alert>
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={deleteGatewayV2ById.isPending}>
- Cancel
- </AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="danger"
- isPending={deleteGatewayV2ById.isPending}
onClick={(event) => {
event.preventDefault();
handleDeleteGateway();
diff --git a/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/components/GatewayPoolsContent.tsx b/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/components/GatewayPoolsContent.tsx
index d9cb73ad93..21cb55083c 100644
--- a/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/components/GatewayPoolsContent.tsx
+++ b/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/components/GatewayPoolsContent.tsx
@@ -227,6 +227,7 @@ export const GatewayPoolsContent = ({ search }: Props) => {
pool={popUp.editPool.data as TGatewayPool}
/>
<AlertDialog
+ isPending={deletePool.isPending}
open={popUp.deletePool.isOpen}
confirmationValue={(popUp.deletePool.data as TGatewayPool | undefined)?.name}
onOpenChange={(open) => handlePopUpToggle("deletePool", open)}
@@ -245,10 +246,9 @@ export const GatewayPoolsContent = ({ search }: Props) => {
<AlertDescription>Deleting this gateway pool cannot be undone.</AlertDescription>
</Alert>
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={deletePool.isPending}>Cancel</AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="danger"
- isPending={deletePool.isPending}
onClick={(event) => {
event.preventDefault();
handleDeletePool();
diff --git a/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/components/PoolDetailSheet.tsx b/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/components/PoolDetailSheet.tsx
index 2b187a2ef6..270c642ec0 100644
--- a/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/components/PoolDetailSheet.tsx
+++ b/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/components/PoolDetailSheet.tsx
@@ -279,6 +279,7 @@ export const PoolDetailSheet = ({ isOpen, onOpenChange, pool }: Props) => {
</div>
<AlertDialog
+ isPending={removeGateway.isPending}
open={popUp.removeGateway.isOpen}
confirmationValue={(popUp.removeGateway.data as { name: string } | undefined)?.name}
onOpenChange={(open) => handlePopUpToggle("removeGateway", open)}
@@ -301,10 +302,9 @@ export const PoolDetailSheet = ({ isOpen, onOpenChange, pool }: Props) => {
</Alert>
</AlertDialogDescription>
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={removeGateway.isPending}>Cancel</AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="danger"
- isPending={removeGateway.isPending}
onClick={(event) => {
event.preventDefault();
handleRemove();
diff --git a/frontend/src/pages/organization/NetworkingPage/components/RelayTab/RelayTab.tsx b/frontend/src/pages/organization/NetworkingPage/components/RelayTab/RelayTab.tsx
index b7f7912fe8..f251cf171f 100644
--- a/frontend/src/pages/organization/NetworkingPage/components/RelayTab/RelayTab.tsx
+++ b/frontend/src/pages/organization/NetworkingPage/components/RelayTab/RelayTab.tsx
@@ -300,6 +300,7 @@ export const RelayTab = withPermission(
</Table>
)}
<AlertDialog
+ isPending={deleteRelayById.isPending}
open={popUp.deleteRelay.isOpen}
confirmationValue={(popUp.deleteRelay.data as { name?: string })?.name || "relay"}
onOpenChange={(open) => handlePopUpToggle("deleteRelay", open)}
@@ -320,10 +321,9 @@ export const RelayTab = withPermission(
<AlertDescription>Deleting this relay cannot be undone.</AlertDescription>
</Alert>
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={deleteRelayById.isPending}>Cancel</AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="danger"
- isPending={deleteRelayById.isPending}
onClick={(event) => {
event.preventDefault();
handleDeleteRelay();
diff --git a/frontend/src/pages/organization/ProjectsPage/ProjectTypePage/ProjectTypePage.tsx b/frontend/src/pages/organization/ProjectsPage/ProjectTypePage/ProjectTypePage.tsx
index 5d56dc0d6a..cb213e4440 100644
--- a/frontend/src/pages/organization/ProjectsPage/ProjectTypePage/ProjectTypePage.tsx
+++ b/frontend/src/pages/organization/ProjectsPage/ProjectTypePage/ProjectTypePage.tsx
@@ -1165,17 +1165,14 @@ const AllProjectsForType = ({
project={requestedWorkspaceDetails}
/>
<AlertDialog
+ isPending={leaveProject.isPending}
open={popUp.leaveProjectConfirmation.isOpen}
confirmationValue="confirm"
onOpenChange={(isOpen) => {
- if (!leaveProject.isPending) handlePopUpToggle("leaveProjectConfirmation", isOpen);
+ handlePopUpToggle("leaveProjectConfirmation", isOpen);
}}
>
- <AlertDialogContent
- onEscapeKeyDown={(event) => {
- if (leaveProject.isPending) event.preventDefault();
- }}
- >
+ <AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Leave {projectToLeave?.name}?</AlertDialogTitle>
<AlertDialogDescription>
@@ -1184,16 +1181,13 @@ const AllProjectsForType = ({
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogConfirmationField
- inputProps={{ placeholder: "Type confirm here", disabled: leaveProject.isPending }}
+ inputProps={{ placeholder: "Type confirm here" }}
onConfirm={handleLeaveProject}
/>
<AlertDialogFooter>
- <AlertDialogCancel variant="outline" isDisabled={leaveProject.isPending}>
- Cancel
- </AlertDialogCancel>
+ <AlertDialogCancel variant="outline">Cancel</AlertDialogCancel>
<AlertDialogAction
variant="danger"
- isPending={leaveProject.isPending}
onClick={(event) => {
event.preventDefault();
handleLeaveProject();
diff --git a/frontend/src/pages/pam/PamAccessControlPage/components/IdentitiesTab.tsx b/frontend/src/pages/pam/PamAccessControlPage/components/IdentitiesTab.tsx
index 7b1a128682..122aa4758b 100644
--- a/frontend/src/pages/pam/PamAccessControlPage/components/IdentitiesTab.tsx
+++ b/frontend/src/pages/pam/PamAccessControlPage/components/IdentitiesTab.tsx
@@ -312,10 +312,10 @@ export const IdentitiesTab = () => {
/>
<AlertDialog
+ isPending={isRemoving}
open={!!identityToRemove}
confirmationValue={isRemovingManagedIdentity ? "delete" : "remove"}
onOpenChange={(isOpen) => {
- if (!isOpen && isRemoving) return;
if (!isOpen) setIdentityToRemove(null);
}}
>
@@ -344,14 +344,12 @@ export const IdentitiesTab = () => {
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogConfirmationField
- inputProps={{ disabled: isRemoving }}
onConfirm={() => handleDeleteIdentity().catch(() => undefined)}
/>
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={isRemoving}>Cancel</AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="danger"
- isPending={isRemoving}
onClick={(event) => {
event.preventDefault();
handleDeleteIdentity().catch(() => undefined);
diff --git a/frontend/src/pages/project/AccessControlPage/components/ServiceTokenTab/components/ServiceTokenSection/ServiceTokenSection.tsx b/frontend/src/pages/project/AccessControlPage/components/ServiceTokenTab/components/ServiceTokenSection/ServiceTokenSection.tsx
index eefe0ca921..ce584a009b 100644
--- a/frontend/src/pages/project/AccessControlPage/components/ServiceTokenTab/components/ServiceTokenSection/ServiceTokenSection.tsx
+++ b/frontend/src/pages/project/AccessControlPage/components/ServiceTokenTab/components/ServiceTokenSection/ServiceTokenSection.tsx
@@ -108,9 +108,9 @@ export const ServiceTokenSection = withProjectPermission(
</Card>
<AddServiceTokenModal popUp={popUp} handlePopUpToggle={handlePopUpToggle} />
<AlertDialog
+ isPending={deleteServiceToken.isPending}
open={popUp.deleteAPITokenConfirmation.isOpen}
onOpenChange={(isOpen) => {
- if (deleteServiceToken.isPending) return;
if (!isOpen) setDeleteConfirmation("");
handlePopUpToggle("deleteAPITokenConfirmation", isOpen);
}}
@@ -143,12 +143,9 @@ export const ServiceTokenSection = withProjectPermission(
</Field>
</AlertDialogConfirmationField>
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={deleteServiceToken.isPending}>
- Cancel
- </AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="danger"
- isPending={deleteServiceToken.isPending}
isDisabled={!isDeleteConfirmed}
onClick={(event) => {
event.preventDefault();
diff --git a/frontend/src/pages/project/IdentityDetailsByIDPage/components/IdentityActionConfirmationDialog.tsx b/frontend/src/pages/project/IdentityDetailsByIDPage/components/IdentityActionConfirmationDialog.tsx
index 879e8b60e5..01b524eb65 100644
--- a/frontend/src/pages/project/IdentityDetailsByIDPage/components/IdentityActionConfirmationDialog.tsx
+++ b/frontend/src/pages/project/IdentityDetailsByIDPage/components/IdentityActionConfirmationDialog.tsx
@@ -57,11 +57,10 @@ export const IdentityActionConfirmationDialog = ({
return (
<AlertDialog
+ isPending={isPending}
open={open}
confirmationValue={confirmationText}
- onOpenChange={(nextOpen) => {
- if (!isPending) onOpenChange(nextOpen);
- }}
+ onOpenChange={onOpenChange}
>
<AlertDialogContent>
<AlertDialogHeader>
@@ -78,11 +77,10 @@ export const IdentityActionConfirmationDialog = ({
</AlertDialogHeader>
<AlertDialogConfirmationField onConfirm={() => handleConfirm().catch(() => undefined)} />
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={isPending}>Cancel</AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
type="button"
variant="danger"
- isPending={isPending}
isDisabled={isDisabled}
onClick={(event) => {
event.preventDefault();
diff --git a/frontend/src/pages/project/SettingsPage/components/DeleteProjectSection/DeleteProjectSection.tsx b/frontend/src/pages/project/SettingsPage/components/DeleteProjectSection/DeleteProjectSection.tsx
index f31b1c90ea..9ce5f06933 100644
--- a/frontend/src/pages/project/SettingsPage/components/DeleteProjectSection/DeleteProjectSection.tsx
+++ b/frontend/src/pages/project/SettingsPage/components/DeleteProjectSection/DeleteProjectSection.tsx
@@ -233,6 +233,7 @@ export const DeleteProjectSection = () => {
</Card>
<AlertDialog
+ isPending={isDeleting}
open={popUp.deleteWorkspace.isOpen}
confirmationValue={CONFIRM_KEYWORD}
onOpenChange={(isOpen) => handlePopUpToggle("deleteWorkspace", isOpen)}
@@ -252,14 +253,13 @@ export const DeleteProjectSection = () => {
<AlertDialogConfirmationField
inputProps={{ placeholder: `Type ${CONFIRM_KEYWORD} here` }}
onConfirm={() => {
- if (!isDeleting) handleDeleteWorkspaceSubmit();
+ handleDeleteWorkspaceSubmit();
}}
/>
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={isDeleting}>Cancel</AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="danger"
- isPending={isDeleting}
onClick={(event) => {
event.preventDefault();
handleDeleteWorkspaceSubmit();
@@ -272,6 +272,7 @@ export const DeleteProjectSection = () => {
</AlertDialog>
<AlertDialog
+ isPending={isLeaving}
open={popUp.leaveWorkspace.isOpen}
confirmationValue={CONFIRM_KEYWORD}
onOpenChange={(isOpen) => handlePopUpToggle("leaveWorkspace", isOpen)}
@@ -291,14 +292,13 @@ export const DeleteProjectSection = () => {
<AlertDialogConfirmationField
inputProps={{ placeholder: `Type ${CONFIRM_KEYWORD} here` }}
onConfirm={() => {
- if (!isLeaving) handleLeaveWorkspaceSubmit();
+ handleLeaveWorkspaceSubmit();
}}
/>
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={isLeaving}>Cancel</AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="warning"
- isPending={isLeaving}
onClick={(event) => {
event.preventDefault();
handleLeaveWorkspaceSubmit();
diff --git a/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx b/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx
index 17353f7ee6..e5ff84dbf0 100644
--- a/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx
+++ b/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx
@@ -4569,10 +4569,11 @@ const OverviewPageContent = () => {
</DialogContent>
</Dialog>
<AlertDialog
+ isPending={deleteDynamicSecret.isPending}
open={popUp.deleteDynamicSecret.isOpen}
confirmationValue={dynamicSecretDeleteData?.name}
onOpenChange={(isOpen) => {
- if (!deleteDynamicSecret.isPending) handlePopUpToggle("deleteDynamicSecret", isOpen);
+ handlePopUpToggle("deleteDynamicSecret", isOpen);
}}
>
<AlertDialogContent>
@@ -4593,20 +4594,16 @@ const OverviewPageContent = () => {
</AlertDialogHeader>
<AlertDialogConfirmationField
inputProps={{
- disabled: deleteDynamicSecret.isPending,
placeholder: `Type ${dynamicSecretDeleteData?.name ?? "the dynamic secret name"} here`
}}
onConfirm={() => {
- if (!deleteDynamicSecret.isPending) {
- handleDynamicSecretDelete().catch(() => undefined);
- }
+ handleDynamicSecretDelete().catch(() => undefined);
}}
/>
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={deleteDynamicSecret.isPending}>Cancel</AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="danger"
- isPending={deleteDynamicSecret.isPending}
onClick={(event) => {
event.preventDefault();
handleDynamicSecretDelete().catch(() => undefined);
diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/SecretTableRow/SecretEditTableRow.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/SecretTableRow/SecretEditTableRow.tsx
index 0375756bd9..a3d3961670 100644
--- a/frontend/src/pages/secret-manager/OverviewPage/components/SecretTableRow/SecretEditTableRow.tsx
+++ b/frontend/src/pages/secret-manager/OverviewPage/components/SecretTableRow/SecretEditTableRow.tsx
@@ -2187,6 +2187,7 @@ export const SecretEditTableRow = ({
</SheetContent>
</Sheet>
<AlertDialog
+ isPending={isEditing}
open={popUp.editSecret.isOpen}
onOpenChange={(isOpen) => handlePopUpToggle("editSecret", isOpen)}
confirmationValue="confirm"
@@ -2211,14 +2212,13 @@ export const SecretEditTableRow = ({
)}
<AlertDialogConfirmationField />
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={isEditing}>Cancel</AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="project"
onClick={(e) => {
e.preventDefault();
handleEditSecret(popUp?.editSecret?.data);
}}
- isPending={isEditing}
>
Save Changes
</AlertDialogAction>
diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/SelectionPanel/components/BulkDeleteDialog/BulkDeleteDialog.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/SelectionPanel/components/BulkDeleteDialog/BulkDeleteDialog.tsx
index deb0e98331..e2a58a1f68 100644
--- a/frontend/src/pages/secret-manager/OverviewPage/components/SelectionPanel/components/BulkDeleteDialog/BulkDeleteDialog.tsx
+++ b/frontend/src/pages/secret-manager/OverviewPage/components/SelectionPanel/components/BulkDeleteDialog/BulkDeleteDialog.tsx
@@ -52,8 +52,6 @@ const BulkDeleteDialogContent = ({
secretsToDeleteKeys,
usedBySecretSyncsFiltered
}: Omit<BulkDeleteDialogProps, "isOpen">) => {
- const [isDeleting, setIsDeleting] = useState(false);
-
const hasAffectedResources =
(usedBySecretSyncsFiltered && usedBySecretSyncsFiltered.length > 0) ||
(importedBy &&
@@ -90,15 +88,6 @@ const BulkDeleteDialogContent = ({
return items;
}, [selectedEntries]);
- const onConfirmDelete = async () => {
- setIsDeleting(true);
- try {
- await onDeleteApproved();
- } finally {
- setIsDeleting(false);
- }
- };
-
return (
<AlertDialogContent className="max-w-3xl [&>*]:min-w-0">
<AlertDialogHeader>
@@ -134,13 +123,12 @@ const BulkDeleteDialogContent = ({
<AlertDialogConfirmationField inputProps={{ placeholder: "Type delete here" }} />
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={isDeleting}>Cancel</AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="danger"
- isPending={isDeleting}
onClick={(event) => {
event.preventDefault();
- onConfirmDelete();
+ onDeleteApproved();
}}
>
Delete
@@ -150,10 +138,37 @@ const BulkDeleteDialogContent = ({
);
};
-export const BulkDeleteDialog = ({ isOpen, onOpenChange, ...props }: BulkDeleteDialogProps) => {
+export const BulkDeleteDialog = ({
+ isOpen,
+ onOpenChange,
+ onDeleteApproved,
+ ...props
+}: BulkDeleteDialogProps) => {
+ const [isDeleting, setIsDeleting] = useState(false);
+
+ const onConfirmDelete = async () => {
+ setIsDeleting(true);
+ try {
+ await onDeleteApproved();
+ } finally {
+ setIsDeleting(false);
+ }
+ };
+
return (
- <AlertDialog open={isOpen} confirmationValue={CONFIRMATION_KEYWORD} onOpenChange={onOpenChange}>
- {isOpen && <BulkDeleteDialogContent onOpenChange={onOpenChange} {...props} />}
+ <AlertDialog
+ open={isOpen}
+ isPending={isDeleting}
+ confirmationValue={CONFIRMATION_KEYWORD}
+ onOpenChange={onOpenChange}
+ >
+ {isOpen && (
+ <BulkDeleteDialogContent
+ onOpenChange={onOpenChange}
+ onDeleteApproved={onConfirmDelete}
+ {...props}
+ />
+ )}
</AlertDialog>
);
};
diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/DynamicSecretLease.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/DynamicSecretLease.tsx
index 84fde73963..70c4d47968 100644
--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/DynamicSecretLease.tsx
+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/DynamicSecretLease.tsx
@@ -348,10 +348,11 @@ export const DynamicSecretLease = ({
</Dialog>
<AlertDialog
+ isPending={deleteDynamicSecretLease.isPending}
open={popUp.deleteSecret.isOpen}
confirmationValue="delete"
onOpenChange={(isOpen) => {
- if (!deleteDynamicSecretLease.isPending) handlePopUpToggle("deleteSecret", isOpen);
+ handlePopUpToggle("deleteSecret", isOpen);
}}
>
<AlertDialogContent>
@@ -370,18 +371,14 @@ export const DynamicSecretLease = ({
</AlertDialogHeader>
<AlertDialogConfirmationField
inputProps={{
- disabled: deleteDynamicSecretLease.isPending,
placeholder: "Type delete here"
}}
onConfirm={handleDeleteConfirmation}
/>
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={deleteDynamicSecretLease.isPending}>
- Cancel
- </AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="danger"
- isPending={deleteDynamicSecretLease.isPending}
onClick={(event) => {
event.preventDefault();
handleDeleteConfirmation();
diff --git a/frontend/src/pages/secret-manager/SettingsPage/components/EnvironmentSection/EnvironmentSection.tsx b/frontend/src/pages/secret-manager/SettingsPage/components/EnvironmentSection/EnvironmentSection.tsx
index 9c4bb62384..dd66033464 100644
--- a/frontend/src/pages/secret-manager/SettingsPage/components/EnvironmentSection/EnvironmentSection.tsx
+++ b/frontend/src/pages/secret-manager/SettingsPage/components/EnvironmentSection/EnvironmentSection.tsx
@@ -303,10 +303,10 @@ export const EnvironmentSection = () => {
</AlertDialogContent>
</AlertDialog>
<AlertDialog
+ isPending={isDeletePending}
open={popUp.hardDeleteEnv.isOpen}
confirmationValue={hardDeleteEnvData?.slug}
onOpenChange={(isOpen) => {
- if (!isOpen && isDeletePending) return;
handlePopUpToggle("hardDeleteEnv", isOpen);
}}
>
@@ -329,18 +329,16 @@ export const EnvironmentSection = () => {
</AlertDescription>
</Alert>
<AlertDialogConfirmationField
- inputProps={{ disabled: isDeletePending }}
onConfirm={() => onEnvHardDeleteSubmit().catch(() => undefined)}
/>
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={isDeletePending}>Cancel</AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="danger"
onClick={(event) => {
event.preventDefault();
onEnvHardDeleteSubmit().catch(() => undefined);
}}
- isPending={isDeletePending}
>
Delete Now
</AlertDialogAction>
diff --git a/frontend/src/views/Alerts/AlertAction.tsx b/frontend/src/views/Alerts/AlertAction.tsx
index f62d830e96..a4dd122647 100644
--- a/frontend/src/views/Alerts/AlertAction.tsx
+++ b/frontend/src/views/Alerts/AlertAction.tsx
@@ -278,6 +278,7 @@ export const AlertAction = ({
unavailableEventTypes={usedEventTypes}
/>
<AlertDialog
+ isPending={deleteAlert.isPending}
open={popUp.deleteAlert.isOpen}
confirmationValue="delete"
onOpenChange={(open) => handlePopUpToggle("deleteAlert", open)}
@@ -295,10 +296,9 @@ export const AlertAction = ({
<AlertDescription>Removing this alert cannot be undone.</AlertDescription>
</Alert>
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={deleteAlert.isPending}>Cancel</AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="danger"
- isPending={deleteAlert.isPending}
onClick={(event) => {
event.preventDefault();
handleDeleteAlert();
diff --git a/frontend/src/views/IdentityAuthMethods/helpers/IdentityAuthRevokeDialog.tsx b/frontend/src/views/IdentityAuthMethods/helpers/IdentityAuthRevokeDialog.tsx
index 5a43de0382..9489295978 100644
--- a/frontend/src/views/IdentityAuthMethods/helpers/IdentityAuthRevokeDialog.tsx
+++ b/frontend/src/views/IdentityAuthMethods/helpers/IdentityAuthRevokeDialog.tsx
@@ -113,12 +113,10 @@ export const IdentityAuthRevokeDialog = ({
return (
<AlertDialog
+ isPending={isRemoving}
open={open}
confirmationValue="confirm"
- onOpenChange={(isOpen) => {
- if (!isOpen && isRemoving) return;
- onOpenChange(isOpen);
- }}
+ onOpenChange={onOpenChange}
>
<AlertDialogContent>
<AlertDialogHeader>
@@ -131,15 +129,11 @@ export const IdentityAuthRevokeDialog = ({
later.
</AlertDialogDescription>
</AlertDialogHeader>
- <AlertDialogConfirmationField
- inputProps={{ disabled: isRemoving }}
- onConfirm={() => handleDelete().catch(() => undefined)}
- />
+ <AlertDialogConfirmationField onConfirm={() => handleDelete().catch(() => undefined)} />
<AlertDialogFooter>
- <AlertDialogCancel isDisabled={isRemoving}>Cancel</AlertDialogCancel>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="danger"
- isPending={isRemoving}
onClick={(event) => {
event.preventDefault();
handleDelete().catch(() => undefined);