diff --git a/packages/renderer/src/App.tsx b/packages/renderer/src/App.tsx index 6d44fc4b..6d0e2e70 100644 --- a/packages/renderer/src/App.tsx +++ b/packages/renderer/src/App.tsx @@ -2,13 +2,13 @@ import { ConfigProvider, theme } from "antd"; import React, { FC, Suspense, lazy, useEffect } from "react"; import { useDispatch } from "react-redux"; import { BrowserRouter, Route, Routes } from "react-router-dom"; -import { DownloadFilter } from "./nodes/HomePage"; import { setAppStore, increase } from "./store"; import "dayjs/locale/zh-cn"; import zhCN from "antd/locale/zh_CN"; import "./App.scss"; import useElectron from "./hooks/electron"; import Loading from "./components/Loading"; +import { DownloadFilter } from "./types"; const AppLayout = lazy(() => import("./layout/App")); const HomePage = lazy(() => import("./nodes/HomePage")); diff --git a/packages/renderer/src/nodes/HomePage/index.tsx b/packages/renderer/src/nodes/HomePage/index.tsx index e1774708..868b4bf2 100644 --- a/packages/renderer/src/nodes/HomePage/index.tsx +++ b/packages/renderer/src/nodes/HomePage/index.tsx @@ -12,7 +12,7 @@ import "./index.scss"; import PageContainer from "../../components/PageContainer"; import { usePagination } from "ahooks"; import useElectron from "../../hooks/electron"; -import { DownloadStatus, DownloadType } from "../../types"; +import { DownloadFilter, DownloadStatus, DownloadType } from "../../types"; import { ProList } from "@ant-design/pro-components"; import { DownloadOutlined, @@ -32,11 +32,6 @@ import { moment } from "../../utils"; const { Text } = Typography; -export enum DownloadFilter { - list = "list", - done = "done", -} - interface Props { filter?: DownloadFilter; } diff --git a/packages/renderer/src/types.ts b/packages/renderer/src/types.ts index f2f682d8..ee163439 100644 --- a/packages/renderer/src/types.ts +++ b/packages/renderer/src/types.ts @@ -23,3 +23,8 @@ export enum DownloadType { m3u8 = "m3u8", bilibili = "bilibili", } + +export enum DownloadFilter { + list = "list", + done = "done", +}