import { useParams } from 'common' import { toast } from 'sonner' import { Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogSection, DialogSectionSeparator, DialogTitle, } from 'ui' import { useS3AccessKeyDeleteMutation } from '@/data/storage/s3-access-key-delete-mutation' interface RevokeCredentialModalProps { visible: boolean selectedCredential?: { id: string; description: string } onClose: () => void } export const RevokeCredentialModal = ({ visible, selectedCredential, onClose, }: RevokeCredentialModalProps) => { const { ref: projectRef } = useParams() const { mutate: deleteS3AccessKey, isPending: isDeleting } = useS3AccessKeyDeleteMutation({ onSuccess: () => { toast.success('Successfully revoked S3 access key') onClose() }, }) return ( Revoke credential {selectedCredential?.description} This action is irreversible and requests made with these access keys will stop working. ) }