summaryrefslogtreecommitdiffstats
path: root/frontend
diff options
context:
space:
mode:
authorWes Bos <wesbos@gmail.com>2018-05-11 13:21:14 -0400
committerWes Bos <wesbos@gmail.com>2018-05-11 13:21:14 -0400
commitd88e20901e8fca1ff94a1f80f7a9e0ac3481c8e8 (patch)
tree5bcdf3b3a676a8178e9641debfb56e8fb5350683 /frontend
parentda59ab74f56c677f07765135d68fa7239f4569e0 (diff)
app
Diffstat (limited to 'frontend')
-rw-r--r--frontend/lib/withData.js2
-rw-r--r--frontend/pages/_app.js5
2 files changed, 3 insertions, 4 deletions
diff --git a/frontend/lib/withData.js b/frontend/lib/withData.js
index 3210cf6..e1795c1 100644
--- a/frontend/lib/withData.js
+++ b/frontend/lib/withData.js
@@ -36,4 +36,4 @@ const client = new ApolloClient({
// TODO don't export client for page.js
export { client };
-export default withApollo({ client });
+export default withApollo({ client, getInitialProps: true });
diff --git a/frontend/pages/_app.js b/frontend/pages/_app.js
index 63c6be5..daa3e68 100644
--- a/frontend/pages/_app.js
+++ b/frontend/pages/_app.js
@@ -1,6 +1,5 @@
import App, { Container } from 'next/app';
import React from 'react';
-import { withRouter } from 'next/router';
import withData from '../lib/withData';
// Next.js wraps each Page in an <App></App> component. This is handy for when you want to persist anything from page to page, or just access a component that is 1 level higher than each page.
@@ -14,10 +13,10 @@ class MyApp extends App {
if (Component.getInitialProps) {
pageProps = await Component.getInitialProps(ctx);
}
-
// surface the router on each page
pageProps.router = router;
+ console.log(router.query);
return { pageProps };
}
@@ -31,4 +30,4 @@ class MyApp extends App {
}
}
-export default withRouter(withData(MyApp));
+export default withData(MyApp);