mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
chore: remove unused routing components
This commit is contained in:
parent
cd11e6e36f
commit
68b21bbb04
8 changed files with 23 additions and 120 deletions
|
@ -3,9 +3,9 @@ import React from 'react';
|
|||
|
||||
import { DASHBOARD_APP_PATHS } from 'apps/dashboard/routes/routes';
|
||||
import ConnectionRequired from 'components/ConnectionRequired';
|
||||
import { toAsyncPageRouteConfig } from 'components/router/AsyncRoute';
|
||||
import { toViewManagerPageRouteConfig } from 'components/router/LegacyRoute';
|
||||
import { toRedirectRouteConfig } from 'components/router/Redirect';
|
||||
import { toAsyncPageRoute } from 'components/router/AsyncRoute';
|
||||
import { toViewManagerPageRoute } from 'components/router/LegacyRoute';
|
||||
import { toRedirectRoute } from 'components/router/Redirect';
|
||||
import AppLayout from '../AppLayout';
|
||||
import { REDIRECTS } from './_redirects';
|
||||
import { ASYNC_USER_ROUTES } from './asyncRoutes';
|
||||
|
@ -20,14 +20,14 @@ export const STABLE_APP_ROUTES: RouteObject[] = [
|
|||
/* User routes */
|
||||
element: <ConnectionRequired isUserRequired />,
|
||||
children: [
|
||||
...ASYNC_USER_ROUTES.map(toAsyncPageRouteConfig),
|
||||
...LEGACY_USER_ROUTES.map(toViewManagerPageRouteConfig)
|
||||
...ASYNC_USER_ROUTES.map(toAsyncPageRoute),
|
||||
...LEGACY_USER_ROUTES.map(toViewManagerPageRoute)
|
||||
]
|
||||
},
|
||||
|
||||
/* Public routes */
|
||||
{ index: true, loader: () => redirect('/home.html') },
|
||||
...LEGACY_PUBLIC_ROUTES.map(toViewManagerPageRouteConfig),
|
||||
...LEGACY_PUBLIC_ROUTES.map(toViewManagerPageRoute),
|
||||
|
||||
/* Suppress warnings for unhandled routes */
|
||||
{ path: '*', element: null }
|
||||
|
@ -35,7 +35,7 @@ export const STABLE_APP_ROUTES: RouteObject[] = [
|
|||
},
|
||||
|
||||
/* Redirects for old paths */
|
||||
...REDIRECTS.map(toRedirectRouteConfig),
|
||||
...REDIRECTS.map(toRedirectRoute),
|
||||
|
||||
/* Ignore dashboard routes */
|
||||
...Object.entries(DASHBOARD_APP_PATHS).map(([, path]) => ({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue