refactor: centralize confirm and prompt dialog calls in frontend
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user