=> {
try {
await lib.instance.deleteTemplate(state.token, deleting.template_id);
setNotif({
message: i18n.str`Template "${deleting.template_description}" (ID: ${deleting.template_id}) has been deleted`,
type: "SUCCESS",
});
} catch (error) {
setNotif({
message: i18n.str`Failed to delete template`,
type: "ERROR",
description: error instanceof Error ? error.message : undefined,
});
}
setDeleting(null);
}}
>
If you delete the template "{deleting.template_description}" (ID:{" "}
{deleting.template_id}) you may loose information
Deleting an template cannot be undone.