refactor: move website list
This commit is contained in:
parent
7f40a049c8
commit
3d9f768a44
@ -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(() => {
|
||||
<Route element={<Layout />}>
|
||||
<Route path="/dashboard" element={<Dashboard />} />
|
||||
<Route path="/monitor/*" element={<MonitorPage />} />
|
||||
<Route path="/website" element={<Website />} />
|
||||
<Route path="/website/*" element={<WebsitePage />} />
|
||||
<Route path="/servers" element={<Servers />} />
|
||||
<Route path="/settings/*" element={<SettingsPage />} />
|
||||
</Route>
|
||||
|
@ -1,7 +0,0 @@
|
||||
import React from 'react';
|
||||
import { WebsiteList } from '../components/WebsiteList';
|
||||
|
||||
export const Website: React.FC = React.memo(() => {
|
||||
return <WebsiteList />;
|
||||
});
|
||||
Website.displayName = 'Website';
|
14
src/client/pages/Website/index.tsx
Normal file
14
src/client/pages/Website/index.tsx
Normal file
@ -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 (
|
||||
<div className="h-full">
|
||||
<Routes>
|
||||
<Route path="/" element={<WebsiteList />} />
|
||||
</Routes>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
WebsitePage.displayName = 'WebsitePage';
|
Loading…
Reference in New Issue
Block a user