mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-28 12:43:11 +10:00
Fix ServerRouter props
This commit is contained in:
parent
a6907b7139
commit
c14fe8efe8
1 changed files with 8 additions and 5 deletions
13
src/index.js
13
src/index.js
|
|
@ -12,11 +12,14 @@ const ClientApp = () => (
|
|||
</BrowserRouter>
|
||||
);
|
||||
|
||||
const ServerApp = (props) => (
|
||||
<ServerRouter { ...props } >
|
||||
<Routes />
|
||||
</ServerRouter>
|
||||
);
|
||||
const ServerApp = (props) => {
|
||||
const { url, context } = props;
|
||||
return (
|
||||
<ServerRouter location={ url } context={ context } >
|
||||
<Routes />
|
||||
</ServerRouter>
|
||||
);
|
||||
};
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
ReactDOM.render(<ClientApp />, document.getElementById('root'));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue