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:
@@ -4,6 +4,7 @@
|
||||
* Account selection is integrated into the folder tree (left pane).
|
||||
*/
|
||||
|
||||
import { asError } from '@/utils/errorTypes';
|
||||
import React, { useState, useEffect, useCallback, useRef, useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link } from 'react-router-dom';
|
||||
@@ -778,8 +779,8 @@ export function MailPage() {
|
||||
await loadMails();
|
||||
toast.success(t('mail.syncSuccess'));
|
||||
}
|
||||
} catch (err: any) {
|
||||
const msg = err?.message || err?.detail || (typeof err === 'string' ? err : 'Sync failed');
|
||||
} catch (err: unknown) { const errObj = asError(err);
|
||||
const msg = errObj?.message || errObj?.detail || (typeof errObj === 'string' ? errObj : 'Sync failed');
|
||||
toast.error(msg);
|
||||
} finally {
|
||||
setIsSyncing(false);
|
||||
|
||||
Reference in New Issue
Block a user