Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

Commit

Permalink
style(ssr): Some ssr fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
FDiskas committed Dec 22, 2017
1 parent 94af536 commit 424b704
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/server/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,14 @@ app.use((req: express.Request, res: express.Response) => {

const context: { url?: string } = {};
const html = renderToString(
<Provider store={store}>
<Provider store={store}>
<StaticRouter basename={`${process.env.BASE_PATH}`}>
<Switch>
<Route path="/" component={HomePage} exact={true} layout={DefaultLayout} />
<Route path="/demo" component={DemoPage} layout={DefaultLayout} />
<Route path="/login" component={LoginPage} layout={EmptyLayout} />
</Switch>
</StaticRouter>
</Provider>
<Provider store={store}>
<StaticRouter basename={`${process.env.BASE_PATH}`}>
<Switch>
<Route path="/" component={HomePage} exact={true} layout={DefaultLayout} />
<Route path="/demo" component={DemoPage} layout={DefaultLayout} />
<Route path="/login" component={LoginPage} layout={EmptyLayout} />
</Switch>
</StaticRouter>
</Provider>,
);
if (context.url) {
Expand Down

0 comments on commit 424b704

Please sign in to comment.