refactor: remove alert notifications from history page error handling

This commit is contained in:
iHeyTang 2025-09-28 15:12:43 +08:00
parent b7c4fc8b92
commit 8a1c5e982f
1 changed files with 1 additions and 4 deletions

View File

@ -19,7 +19,6 @@ export default function History() {
setRecords(logs || []);
} catch (error) {
console.error('Failed to load records:', error);
alert(t('common.operationFailed'));
} finally {
setLoading(false);
}
@ -49,10 +48,8 @@ export default function History() {
setRefreshing(true);
try {
await loadRecords();
alert(t('home.refreshSuccess'));
} catch (error) {
console.error('Refresh failed:', error);
alert(t('home.refreshFailed'));
} finally {
setRefreshing(false);
}
@ -64,8 +61,8 @@ export default function History() {
// Navigate to result page to view
navigate(`/result?taskId=${record.executionId}`);
} else if (record.status === 'failed') {
console.error('Refresh failed:', record.errorMessage);
// Show error message
alert(`${t('common.operationFailed')}\n${record.errorMessage || t('common.operationFailed')}`);
} else if (record.status === 'processing') {
// Navigate to generation page to view progress
navigate(`/result?taskId=${record.executionId}`);