mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-21 20:28:17 +00:00
refactor: streamline modal close handlers and completion callbacks across various components
This commit is contained in:
+16
-23
@@ -45,31 +45,24 @@ export const PkiCollectionPage = () => {
|
||||
] as const);
|
||||
|
||||
const onDeletePkiCollectionSubmit = async (collectionIdToDelete: string) => {
|
||||
try {
|
||||
if (!projectId) return;
|
||||
if (!projectId) return;
|
||||
|
||||
await deletePkiCollection({
|
||||
projectId,
|
||||
collectionId: collectionIdToDelete
|
||||
});
|
||||
await deletePkiCollection({
|
||||
projectId,
|
||||
collectionId: collectionIdToDelete
|
||||
});
|
||||
|
||||
createNotification({
|
||||
text: "Successfully deleted PKI collection",
|
||||
type: "success"
|
||||
});
|
||||
handlePopUpClose("deletePkiCollection");
|
||||
navigate({
|
||||
to: "/projects/cert-management/$projectId/certificates",
|
||||
params: {
|
||||
projectId
|
||||
}
|
||||
});
|
||||
} catch {
|
||||
createNotification({
|
||||
text: "Failed to delete PKI collection",
|
||||
type: "error"
|
||||
});
|
||||
}
|
||||
createNotification({
|
||||
text: "Successfully deleted PKI collection",
|
||||
type: "success"
|
||||
});
|
||||
handlePopUpClose("deletePkiCollection");
|
||||
navigate({
|
||||
to: "/projects/cert-management/$projectId/certificates",
|
||||
params: {
|
||||
projectId
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user