Chore/update confirmation modal (#22328)

* Update confirmation modal

* update all props

* Update ExtensionCard.tsx

* clen up
This commit is contained in:
Jonathan Summers-Muir
2024-04-02 13:39:27 +08:00
committed by GitHub
parent ab39435862
commit 645273cb45
43 changed files with 766 additions and 891 deletions

View File

@@ -121,22 +121,20 @@ const EdgeFunctionSecrets = () => {
<ConfirmationModal
loading={isDeleting}
visible={selectedSecret !== undefined}
buttonLabel="Delete secret"
buttonLoadingLabel="Deleting secret"
header={`Confirm to delete secret "${selectedSecret?.name}"`}
onSelectCancel={() => setSelectedSecret(undefined)}
onSelectConfirm={() => {
confirmLabel="Delete secret"
confirmLabelLoading="Deleting secret"
title={`Confirm to delete secret "${selectedSecret?.name}"`}
onCancel={() => setSelectedSecret(undefined)}
onConfirm={() => {
if (selectedSecret !== undefined) {
deleteSecret({ projectRef, secrets: [selectedSecret.name] })
}
}}
>
<Modal.Content className="py-4">
<p className="text-sm">
Before removing this secret, do ensure that none of your edge functions are currently
actively using this secret. This action cannot be undone.
</p>
</Modal.Content>
<p className="text-sm">
Before removing this secret, do ensure that none of your edge functions are currently
actively using this secret. This action cannot be undone.
</p>
</ConfirmationModal>
</>
)