feat: migrate legacy app to use react data router
This commit is contained in:
parent
675f9625f2
commit
ff885b9b21
5 changed files with 76 additions and 59 deletions
16
src/apps/stable/AppRouter.tsx
Normal file
16
src/apps/stable/AppRouter.tsx
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { History } from '@remix-run/router';
|
||||
import React from 'react';
|
||||
import { RouterProvider, createHashRouter } from 'react-router-dom';
|
||||
|
||||
import { STABLE_APP_ROUTES } from './routes/routes';
|
||||
import { useLegacyRouterSync } from 'hooks/useLegacyRouterSync';
|
||||
|
||||
const router = createHashRouter([
|
||||
...STABLE_APP_ROUTES
|
||||
]);
|
||||
|
||||
export default function StableAppRouter({ history }: { history: History }) {
|
||||
useLegacyRouterSync({ router, history });
|
||||
|
||||
return <RouterProvider router={router} />;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue