Skip to content

Commit

Permalink
feat(routes): use routes as function to pass some options
Browse files Browse the repository at this point in the history
  • Loading branch information
kiki-le-singe committed Jan 2, 2017
1 parent 7b8ef76 commit f07818d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const rootEl = document.getElementById('root')

const renderApp = () => {
// Sync routes both on client and server
match({ history, routes }, (error, redirectLocation, renderProps) => {
match({ history, routes: routes(store) }, (error, redirectLocation, renderProps) => {
render(
<AppContainer>
<Provider store={store}>
Expand Down
2 changes: 1 addition & 1 deletion src/server/utils/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const handleRender = (ctx) => {
const memoryHistory = createMemoryHistory(_ctx.url)
const history = syncHistoryWithStore(memoryHistory, store)

match({ history, routes, location }, (error, redirectLocation, renderProps) => {
match({ history, routes: routes(store), location }, (error, redirectLocation, renderProps) => {
if (error) {
_ctx.status = 500
_ctx.body = error.message
Expand Down

0 comments on commit f07818d

Please sign in to comment.