1
0
Fork 0
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:
Grady Hallenbeck 2023-10-06 20:26:00 -07:00
parent 06b991ddcf
commit 675f9625f2
8 changed files with 162 additions and 62 deletions

17
src/RootAppRouter.tsx Normal file
View 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} />;
}