fix(audit): P2 frontend any→concrete types (181→61), heroicons→lucide-react, missing type exports, toast API, Select options, TaskStatus types; P2-9 hooks.py type annotations
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { asError } from '@/utils/errorTypes';
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
@@ -55,8 +56,8 @@ export function AutomationSettingsPage() {
|
||||
try {
|
||||
await updateMutation.mutateAsync(form);
|
||||
toast.success(t('automation.settingsSaved'));
|
||||
} catch (err: any) {
|
||||
toast.error(err.message || t('common.error'));
|
||||
} catch (err: unknown) { const errObj = asError(err);
|
||||
toast.error(errObj.message || t('common.error'));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -92,8 +93,8 @@ export function AutomationSettingsPage() {
|
||||
setShowMiniAppForm(false);
|
||||
setMiniAppForm({ app_id: '', name: '', icon: 'AppWindow', description: '', render_schema: '{}' });
|
||||
refetchMiniapps();
|
||||
} catch (err: any) {
|
||||
toast.error(err.message || t('common.error'));
|
||||
} catch (err: unknown) { const errObj = asError(err);
|
||||
toast.error(errObj.message || t('common.error'));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -102,8 +103,8 @@ export function AutomationSettingsPage() {
|
||||
await deleteMiniAppMutation.mutateAsync(appId);
|
||||
toast.success(t('automation.miniAppDeleted'));
|
||||
refetchMiniapps();
|
||||
} catch (err: any) {
|
||||
toast.error(err.message || t('common.error'));
|
||||
} catch (err: unknown) { const errObj = asError(err);
|
||||
toast.error(errObj.message || t('common.error'));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user