mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-17 10:06:17 +08:00
Merge pull request #375 from toeverything/feature/defaultRoute
feat(routes): clear unused routes
This commit is contained in:
@@ -1,15 +1,9 @@
|
||||
import { Navigate, Route, Routes } from 'react-router-dom';
|
||||
|
||||
import { Login } from './account';
|
||||
import Agenda from './agenda';
|
||||
import { LigoVirgoRootContainer } from './AppContainer';
|
||||
import Recent from './recent';
|
||||
import { RoutePrivate } from './RoutePrivate';
|
||||
import { RoutePublicAutoLogin } from './RoutePublicAutoLogin';
|
||||
import Search from './search';
|
||||
import Settings from './settings';
|
||||
import Shared from './shared';
|
||||
import Starred from './starred';
|
||||
import { PageNotFound } from './status/page-not-found';
|
||||
import { WorkspaceNotFound } from './status/workspace-not-found';
|
||||
import { Tools } from './tools';
|
||||
@@ -25,13 +19,6 @@ export function LigoVirgoRoutes() {
|
||||
path="/error/workspace"
|
||||
element={<WorkspaceNotFound />}
|
||||
/>
|
||||
|
||||
<Route path="/agenda/*" element={<Agenda />} />
|
||||
<Route path="/recent" element={<Recent />} />
|
||||
<Route path="/search" element={<Search />} />
|
||||
<Route path="/settings" element={<Settings />} />
|
||||
<Route path="/shared" element={<Shared />} />
|
||||
<Route path="/started" element={<Starred />} />
|
||||
<Route path="/ui" element={<UIPage />} />
|
||||
<Route
|
||||
path="/:workspace_id/*"
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
export default function Recent() {
|
||||
return <span>Recent</span>;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export default function Search() {
|
||||
return <span>Search</span>;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export default function Settings() {
|
||||
return <span>Settings</span>;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export default function Shared() {
|
||||
return <span>Shared</span>;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export default function Starred() {
|
||||
return <span>Starred</span>;
|
||||
}
|
||||
@@ -31,6 +31,7 @@ export function WorkspaceHome() {
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
navigate(`/${workspace_id}/${user_initial_page_id}`);
|
||||
};
|
||||
navigate_to_user_initial_page();
|
||||
|
||||
@@ -4,7 +4,6 @@ import { WorkspaceRootContainer } from './Container';
|
||||
import { Page } from './docs';
|
||||
import { Edgeless } from './Edgeless';
|
||||
import { WorkspaceHome } from './Home';
|
||||
import Labels from './labels';
|
||||
import Pages from './pages';
|
||||
|
||||
export function WorkspaceContainer() {
|
||||
@@ -21,7 +20,6 @@ export function WorkspaceContainer() {
|
||||
return (
|
||||
<Routes>
|
||||
<Route path="/" element={<WorkspaceRootContainer />}>
|
||||
<Route path="/labels" element={<Labels />} />
|
||||
<Route path="/pages" element={<Pages />} />
|
||||
<Route
|
||||
path="/:page_id/edgeless"
|
||||
|
||||
Reference in New Issue
Block a user