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

View file

@ -52,3 +52,16 @@ export const toAsyncPageRoute = ({ path, page, element, type = AsyncRouteType.St
/>
);
};
export function toAsyncPageRouteConfig({ path, page, element, type = AsyncRouteType.Stable }: AsyncRoute) {
const Element = element || (
type === AsyncRouteType.Experimental ?
ExperimentalAsyncPage :
StableAsyncPage
);
return {
path,
element: <Element page={page ?? path} />
};
}