From dab6ad917c62124f64cfcd9255952a4c9eff632b Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Thu, 16 Jan 2025 23:42:53 +0800 Subject: [PATCH] refactor: remove unused code --- ui/src/components/workflow/WorkflowRuns.tsx | 2 +- ui/src/pages/certificates/CertificateList.tsx | 2 +- ui/src/pages/workflows/WorkflowList.tsx | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ui/src/components/workflow/WorkflowRuns.tsx b/ui/src/components/workflow/WorkflowRuns.tsx index f716b8c4..ef9fd5ea 100644 --- a/ui/src/components/workflow/WorkflowRuns.tsx +++ b/ui/src/components/workflow/WorkflowRuns.tsx @@ -129,7 +129,7 @@ const WorkflowRuns = ({ className, style, workflowId }: WorkflowRunsProps) => { const [page, setPage] = useState(1); const [pageSize, setPageSize] = useState(10); - const { loading, loadedError } = useRequest( + const { loading, error: loadedError } = useRequest( () => { return listWorkflowRuns({ workflowId: workflowId, diff --git a/ui/src/pages/certificates/CertificateList.tsx b/ui/src/pages/certificates/CertificateList.tsx index b2b861e0..3c7aa98f 100644 --- a/ui/src/pages/certificates/CertificateList.tsx +++ b/ui/src/pages/certificates/CertificateList.tsx @@ -1,7 +1,7 @@ import { useState } from "react"; import { useTranslation } from "react-i18next"; import { useNavigate, useSearchParams } from "react-router-dom"; -import { DeleteOutlined as DeleteOutlinedIcon, SelectOutlined as SelectOutlinedIcon, WarningOutlined as WarningOutlinedIcon } from "@ant-design/icons"; +import { DeleteOutlined as DeleteOutlinedIcon, SelectOutlined as SelectOutlinedIcon } from "@ant-design/icons"; import { PageHeader } from "@ant-design/pro-components"; import { useRequest } from "ahooks"; import { Button, Divider, Empty, Menu, type MenuProps, Modal, Radio, Space, Table, type TableProps, Tooltip, Typography, notification, theme } from "antd"; diff --git a/ui/src/pages/workflows/WorkflowList.tsx b/ui/src/pages/workflows/WorkflowList.tsx index ba1f7bb2..f997b98d 100644 --- a/ui/src/pages/workflows/WorkflowList.tsx +++ b/ui/src/pages/workflows/WorkflowList.tsx @@ -20,7 +20,6 @@ import { type MenuProps, Modal, Radio, - Result, Space, Switch, Table,