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
|
@ -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} />
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue