mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
13 lines
450 B
JavaScript
13 lines
450 B
JavaScript
import React from 'react';
|
|
import ReactDOM from 'react-dom';
|
|
|
|
// TODO: Probably need to rehydrate on view restores
|
|
|
|
export default (view, params, { detail }) => {
|
|
if (detail.options?.pageComponent) {
|
|
import(/* webpackChunkName: "[request]" */ `./pages/${detail.options.pageComponent}`)
|
|
.then(({ default: component }) => {
|
|
ReactDOM.render(React.createElement(component, params), view);
|
|
});
|
|
}
|
|
};
|