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:
Agent Zero
2026-08-17 22:24:24 +02:00
parent 40fd633917
commit 45ebbee26f
52 changed files with 404 additions and 302 deletions
+7 -6
View File
@@ -1,3 +1,4 @@
import { asError } from '@/utils/errorTypes';
import React, { useState, useCallback } from 'react';
import { useTranslation } from 'react-i18next';
import { useForm } from 'react-hook-form';
@@ -47,8 +48,8 @@ export function SettingsCurrenciesPage() {
try {
const data = await apiGet<{ items: Currency[]; total: number }>('/currencies');
setCurrencies(data.items);
} catch (err: any) {
setError(err.message || t('common.error'));
} catch (err: unknown) { const errObj = asError(err);
setError(errObj.message || t('common.error'));
} finally {
setLoading(false);
}
@@ -67,8 +68,8 @@ export function SettingsCurrenciesPage() {
setEditing(null);
reset({ code: '', name: '', symbol: '', is_default: false });
await fetchCurrencies();
} catch (err: any) {
setError(err.message || t('common.error'));
} catch (err: unknown) { const errObj = asError(err);
setError(errObj.message || t('common.error'));
}
};
@@ -77,8 +78,8 @@ export function SettingsCurrenciesPage() {
try {
await apiDelete(`/currencies/${id}`);
await fetchCurrencies();
} catch (err: any) {
setError(err.message || t('common.error'));
} catch (err: unknown) { const errObj = asError(err);
setError(errObj.message || t('common.error'));
}
};