1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

fix: use navigate instead of resolver (#5823)

* fix: routes redirect

* Apply suggestions from code review
This commit is contained in:
Matteo Pietro Dazzi 2024-08-13 17:42:26 +02:00 committed by GitHub
parent 4071c44437
commit 2e4e4050cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -1,5 +1,5 @@
import React from 'react';
import { RouteObject, redirect } from 'react-router-dom';
import { Navigate, RouteObject } from 'react-router-dom';
import { REDIRECTS } from 'apps/dashboard/routes/_redirects';
import ConnectionRequired from 'components/ConnectionRequired';
@ -36,7 +36,7 @@ export const EXPERIMENTAL_APP_ROUTES: RouteObject[] = [
},
/* Public routes */
{ index: true, loader: () => redirect('/home.html') },
{ index: true, element: <Navigate replace to='/home.html' /> },
...LEGACY_PUBLIC_ROUTES.map(toViewManagerPageRoute)
]
},

View file

@ -1,4 +1,4 @@
import { RouteObject, redirect } from 'react-router-dom';
import { Navigate, RouteObject } from 'react-router-dom';
import React from 'react';
import ConnectionRequired from 'components/ConnectionRequired';
@ -28,7 +28,7 @@ export const STABLE_APP_ROUTES: RouteObject[] = [
},
/* Public routes */
{ index: true, loader: () => redirect('/home.html') },
{ index: true, element: <Navigate replace to='/home.html' /> },
...LEGACY_PUBLIC_ROUTES.map(toViewManagerPageRoute)
]
},