From f202eba35a7e9f0b92ee6e103eb53ac551226dd2 Mon Sep 17 00:00:00 2001 From: mamamiyear Date: Sun, 26 Oct 2025 23:39:15 +0800 Subject: [PATCH] fix: some build errors and warnings caused by useless code --- src/App.tsx | 1 - src/apis/request.ts | 1 - src/components/KeyValueList.tsx | 2 +- src/components/ResourceList.tsx | 1 - 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 081172b..3617b8d 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import LayoutWrapper from './components/LayoutWrapper'; function App() { diff --git a/src/apis/request.ts b/src/apis/request.ts index e87edde..141f41c 100644 --- a/src/apis/request.ts +++ b/src/apis/request.ts @@ -1,7 +1,6 @@ // 基础请求工具函数 import { API_CONFIG } from './config'; -import type { HTTPValidationError } from './types'; // 请求选项接口 export interface RequestOptions { diff --git a/src/components/KeyValueList.tsx b/src/components/KeyValueList.tsx index fb906c0..976746b 100644 --- a/src/components/KeyValueList.tsx +++ b/src/components/KeyValueList.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState, useRef } from 'react'; +import React, { useEffect, useState } from 'react'; import { Row, Col, Input, Button } from 'antd'; import { PlusOutlined, DeleteOutlined } from '@ant-design/icons'; import './KeyValueList.css'; diff --git a/src/components/ResourceList.tsx b/src/components/ResourceList.tsx index c1d3b19..42248d0 100644 --- a/src/components/ResourceList.tsx +++ b/src/components/ResourceList.tsx @@ -501,7 +501,6 @@ const ResourceList: React.FC = () => { const isMobile = !screens.md; const [loading, setLoading] = React.useState(false); const [data, setData] = React.useState([]); - const [pageSize, setPageSize] = React.useState(10); const [pagination, setPagination] = React.useState<{ current: number; pageSize: number }>({ current: 1, pageSize: 10 }); const handleTableChange: TableProps['onChange'] = (pg) => {