use React.createElement

This commit is contained in:
srgooglo 2022-06-03 21:15:23 +02:00
parent 8a6335762d
commit 78c69e6711

View File

@ -97,7 +97,7 @@ export const InternalRouter = withRouter((props) => {
window.app.setLocation = props.history.setLocation window.app.setLocation = props.history.setLocation
}, []) }, [])
return <React.Suspense fallback={props.staticRenders?.PageLoad ?? "Loading..."}> return <React.Suspense fallback={props.staticRenders?.PageLoad ? React.createElement(props.staticRenders?.PageLoad) : "Loading..."}>
<Switch> <Switch>
{routes.map(({ path, component: Component = React.Fragment }) => ( {routes.map(({ path, component: Component = React.Fragment }) => (
<Route <Route