fix: [FL-193] 修复 lightning-distribution 页面 TypeScript 类型错误

- 修正 EventsModal 和 ScatterModal 组件中 fetchWithAuth 参数类型定义
- 添加缺失的 LightningImportBatchEventItem 类型导入
- 确保类型签名与 useAuth hook 返回的 fetchWithAuth 一致

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
chengkai3
2026-06-27 07:50:43 +08:00
parent 10780285f5
commit 7aaa663cc4
@@ -45,6 +45,7 @@ import type {
LightningImportBatchSummary,
LightningImportBatchListResponse,
LightningImportBatchEventsResponse,
LightningImportBatchEventItem,
} from "@/types/auth";
type ImportFormValues = {
@@ -781,7 +782,7 @@ function EventsModal({
batch: LightningImportBatchSummary | null;
open: boolean;
onClose: () => void;
fetchWithAuth: (input: RequestInfo, init?: RequestInit) => Promise<Response>;
fetchWithAuth: (path: string, init?: RequestInit, retryOnUnauthorized?: boolean) => Promise<Response>;
}) {
const eventsQuery = useQuery({
queryKey: [
@@ -909,7 +910,7 @@ function ScatterModal({
batch: LightningImportBatchSummary | null;
open: boolean;
onClose: () => void;
fetchWithAuth: (input: RequestInfo, init?: RequestInit) => Promise<Response>;
fetchWithAuth: (path: string, init?: RequestInit, retryOnUnauthorized?: boolean) => Promise<Response>;
distributionFilters: DistributionFilterValues;
}) {
const distributionStatsPath = useMemo(() => {