refactor: centralize confirm and prompt dialog calls in frontend

This commit is contained in:
cesnimda
2026-03-22 14:08:30 +01:00
parent c296e26b6c
commit 0863728eab
5 changed files with 18 additions and 4 deletions
@@ -235,7 +235,7 @@ export default function Correspondence({ jobId }: { jobId: number }) {
const deleteMessage = async (messageId: number) => {
if (!window.confirm("Remove this correspondence message?")) return;
if (!confirmAction("Remove this correspondence message?")) return;
try {
await api.delete(`/correspondence/${messageId}`);
await load();
@@ -527,3 +527,8 @@ export default function Correspondence({ jobId }: { jobId: number }) {
</Box>
);
}
tions>
</Dialog>
</Box>
);
}