From 3d9f768a44536bcdfa0d586f3234686fd420b5d0 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Fri, 6 Oct 2023 14:39:08 +0800 Subject: [PATCH] refactor: move website list --- src/client/App.tsx | 4 ++-- src/client/pages/Website.tsx | 7 ------- src/client/pages/Website/index.tsx | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 9 deletions(-) delete mode 100644 src/client/pages/Website.tsx create mode 100644 src/client/pages/Website/index.tsx diff --git a/src/client/App.tsx b/src/client/App.tsx index 3e56adb..e97216b 100644 --- a/src/client/App.tsx +++ b/src/client/App.tsx @@ -2,7 +2,6 @@ import { BrowserRouter, Route, Routes, Navigate } from 'react-router-dom'; import { Layout } from './pages/Layout'; import { Dashboard } from './pages/Dashboard'; import { Login } from './pages/Login'; -import { Website } from './pages/Website'; import { SettingsPage } from './pages/Settings'; import { Servers } from './pages/Servers'; import { useUserStore } from './store/user'; @@ -13,6 +12,7 @@ import { TokenLoginContainer } from './components/TokenLoginContainer'; import React from 'react'; import { trpc, trpcClient } from './api/trpc'; import { MonitorPage } from './pages/Monitor'; +import { WebsitePage } from './pages/Website'; export const AppRoutes: React.FC = React.memo(() => { const { info } = useUserStore(); @@ -23,7 +23,7 @@ export const AppRoutes: React.FC = React.memo(() => { }> } /> } /> - } /> + } /> } /> } /> diff --git a/src/client/pages/Website.tsx b/src/client/pages/Website.tsx deleted file mode 100644 index 9b56fad..0000000 --- a/src/client/pages/Website.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import React from 'react'; -import { WebsiteList } from '../components/WebsiteList'; - -export const Website: React.FC = React.memo(() => { - return ; -}); -Website.displayName = 'Website'; diff --git a/src/client/pages/Website/index.tsx b/src/client/pages/Website/index.tsx new file mode 100644 index 0000000..7ff0945 --- /dev/null +++ b/src/client/pages/Website/index.tsx @@ -0,0 +1,14 @@ +import React from 'react'; +import { Route, Routes } from 'react-router'; +import { WebsiteList } from '../../components/WebsiteList'; + +export const WebsitePage: React.FC = React.memo(() => { + return ( +
+ + } /> + +
+ ); +}); +WebsitePage.displayName = 'WebsitePage';