mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
feat: migrate experimental app to use react data router
This commit is contained in:
parent
06b991ddcf
commit
675f9625f2
8 changed files with 162 additions and 62 deletions
17
src/RootAppRouter.tsx
Normal file
17
src/RootAppRouter.tsx
Normal file
|
@ -0,0 +1,17 @@
|
|||
|
||||
import { History } from '@remix-run/router';
|
||||
import React from 'react';
|
||||
import { RouterProvider, createHashRouter } from 'react-router-dom';
|
||||
|
||||
import { EXPERIMENTAL_APP_ROUTES } from 'apps/experimental/routes/routes';
|
||||
import { useLegacyRouterSync } from 'hooks/useLegacyRouterSync';
|
||||
|
||||
const router = createHashRouter([
|
||||
...EXPERIMENTAL_APP_ROUTES
|
||||
]);
|
||||
|
||||
export default function RootAppRouter({ history }: { history: History}) {
|
||||
useLegacyRouterSync({ router, history });
|
||||
|
||||
return <RouterProvider router={router} />;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue