Skip to content

Commit

Permalink
Fix TypeError in with-graphql-hooks example
Browse files Browse the repository at this point in the history
Reported at #9617

`withRouter` passes in the router object directly, without a `router`
key.
  • Loading branch information
supaspoida authored and Lar Van Der Jagt committed Dec 7, 2019
1 parent a557b7e commit bf9d7a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/with-graphql-hooks/lib/with-graphql-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default App => {
return class GraphQLHooks extends React.Component {
static displayName = 'GraphQLHooks(App)'
static async getInitialProps(ctx) {
const { Component, router } = ctx
const { AppTree, Component, router } = ctx

let appProps = {}
if (App.getInitialProps) {
Expand All @@ -23,7 +23,7 @@ export default App => {
// Run all GraphQL queries
graphQLState = await getInitialState({
App: (
<App
<AppTree
{...appProps}
Component={Component}
router={router}
Expand Down

0 comments on commit bf9d7a4

Please sign in to comment.