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
+3 -2
View File
@@ -2,6 +2,7 @@
* Authentication hooks: login, logout, current user, password reset, tenant switching.
*/
import { asError } from '@/utils/errorTypes';
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
import { apiPost, apiGet, setCsrfToken } from './client';
import { useAuthStore } from '@/store/authStore';
@@ -44,8 +45,8 @@ export function useLogin() {
setCsrfToken(data.csrf_token);
}
},
onError: (error: any) => {
setError(error.message || 'Login failed');
onError: (error: unknown) => { const errObj = asError(error);
setError(errObj.message || 'Login failed');
},
});
}