feat: 错误提示

This commit is contained in:
Archer
2023-03-10 19:44:06 +08:00
parent 453f3be8ce
commit 38d49ea05f
10 changed files with 45 additions and 40 deletions

View File

@@ -120,11 +120,15 @@ const ModelDetail = () => {
try {
await putModelTrainingStatus(model._id);
loadModel();
} catch (error) {
} catch (error: any) {
console.error(error);
toast({
title: error.message || '更新失败',
status: 'error'
});
}
setLoading(false);
}, [setLoading, loadModel, model]);
}, [model, setLoading, loadModel, toast]);
return (
<>