ENCOA-86: Fixed broken labels on release

This commit is contained in:
Joao Ramos
2024-08-21 22:20:38 +01:00
parent 556f642112
commit c6f40f625b

View File

@@ -11,12 +11,12 @@ export const useAssignmentRelease = (assignmentId: string, reload?: Function) =>
axios
.post(`/api/assignments/${assignmentId}/release`)
.then((res) => {
toast.success("Assignment archived!");
toast.success("Assignment released!");
if (reload) reload();
setLoading(false);
})
.catch((err) => {
toast.error("Failed to archive the assignment!");
toast.error("Failed to release the assignment!");
setLoading(false);
});
};