refactor: remove electron-related code
This commit is contained in:
parent
bed8df06e8
commit
2b1e6fe8f5
200 changed files with 2771 additions and 8432 deletions
27
src/routes.tsx
Normal file
27
src/routes.tsx
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import { match } from 'path-to-regexp'
|
||||
import { isValidElement } from 'react'
|
||||
import FollowingListPage from './pages/secondary/FollowingListPage'
|
||||
import HomePage from './pages/secondary/HomePage'
|
||||
import NoteListPage from './pages/secondary/NoteListPage'
|
||||
import NotePage from './pages/secondary/NotePage'
|
||||
import NotificationListPage from './pages/secondary/NotificationListPage'
|
||||
import ProfileListPage from './pages/secondary/ProfileListPage'
|
||||
import ProfilePage from './pages/secondary/ProfilePage'
|
||||
import RelaySettingsPage from './pages/secondary/RelaySettingsPage'
|
||||
|
||||
const ROUTES = [
|
||||
{ path: '/', element: <HomePage /> },
|
||||
{ path: '/notes', element: <NoteListPage /> },
|
||||
{ path: '/notes/:id', element: <NotePage /> },
|
||||
{ path: '/users', element: <ProfileListPage /> },
|
||||
{ path: '/users/:id', element: <ProfilePage /> },
|
||||
{ path: '/users/:id/following', element: <FollowingListPage /> },
|
||||
{ path: '/relay-settings', element: <RelaySettingsPage /> },
|
||||
{ path: '/notifications', element: <NotificationListPage /> }
|
||||
]
|
||||
|
||||
export const routes = ROUTES.map(({ path, element }) => ({
|
||||
path,
|
||||
element: isValidElement(element) ? element : null,
|
||||
matcher: match(path)
|
||||
}))
|
||||
Loading…
Add table
Add a link
Reference in a new issue