From 254c5079c46a8d8028b6d9c7986703d62ee119a0 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Wed, 20 Sep 2023 23:11:03 +0800 Subject: [PATCH] refactor: settings move to single folder --- src/client/App.tsx | 4 ++-- src/client/pages/{Settings.tsx => Settings/index.tsx} | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) rename src/client/pages/{Settings.tsx => Settings/index.tsx} (80%) diff --git a/src/client/App.tsx b/src/client/App.tsx index bd6ac28..b987976 100644 --- a/src/client/App.tsx +++ b/src/client/App.tsx @@ -4,7 +4,7 @@ import { Dashboard } from './pages/Dashboard'; import { Login } from './pages/Login'; import { Monitor } from './pages/Monitor'; import { Website } from './pages/Website'; -import { Settings } from './pages/Settings'; +import { SettingsPage } from './pages/Settings'; import { Servers } from './pages/Servers'; import { useUserStore } from './store/user'; import { Register } from './pages/Register'; @@ -24,7 +24,7 @@ export const AppRoutes: React.FC = React.memo(() => { } /> } /> } /> - } /> + } /> ) : ( diff --git a/src/client/pages/Settings.tsx b/src/client/pages/Settings/index.tsx similarity index 80% rename from src/client/pages/Settings.tsx rename to src/client/pages/Settings/index.tsx index abc9b4a..ee2f488 100644 --- a/src/client/pages/Settings.tsx +++ b/src/client/pages/Settings/index.tsx @@ -1,11 +1,11 @@ import { Menu, MenuProps } from 'antd'; import React from 'react'; import { Routes, Route, useLocation, useNavigate } from 'react-router-dom'; -import { WebsiteInfo } from '../components/WebsiteInfo'; -import { WebsiteList } from '../components/WebsiteList'; -import { useEvent } from '../hooks/useEvent'; +import { WebsiteInfo } from '../../components/WebsiteInfo'; +import { WebsiteList } from '../../components/WebsiteList'; +import { useEvent } from '../../hooks/useEvent'; -export const Settings: React.FC = React.memo(() => { +export const SettingsPage: React.FC = React.memo(() => { const navigate = useNavigate(); const { pathname } = useLocation(); @@ -45,4 +45,4 @@ export const Settings: React.FC = React.memo(() => { ); }); -Settings.displayName = 'Settings'; +SettingsPage.displayName = 'SettingsPage';