summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWes Bos <wesbos@gmail.com>2018-05-14 12:15:11 -0400
committerWes Bos <wesbos@gmail.com>2018-05-14 12:15:11 -0400
commit6e85baf21f312f692bb31c082ae582696c394222 (patch)
tree24d984d43df574d4c8558aeadc4031513315561f
parent063ee77a7363478c9897c7239724389ef5887df4 (diff)
app
-rw-r--r--frontend/pages/_app.js2
-rw-r--r--frontend/pages/index.js4
2 files changed, 4 insertions, 2 deletions
diff --git a/frontend/pages/_app.js b/frontend/pages/_app.js
index 65a6fe3..f649067 100644
--- a/frontend/pages/_app.js
+++ b/frontend/pages/_app.js
@@ -9,7 +9,6 @@ import { withRouter } from 'next/router';
class MyApp extends App {
static async getInitialProps({ Component, ctx }) {
- console.log('GET INITITAL PROPS');
let pageProps = {};
const ComposedComponent = withData(Component);
@@ -20,7 +19,6 @@ class MyApp extends App {
}
render() {
- console.log('RENDER');
const { Component, pageProps, query } = this.props;
const ComposedComponent = withData(Component);
return (
diff --git a/frontend/pages/index.js b/frontend/pages/index.js
index 1dca5e1..920ec9b 100644
--- a/frontend/pages/index.js
+++ b/frontend/pages/index.js
@@ -4,6 +4,10 @@ import Items from '../components/Items';
import Page from '../components/Page';
class Home extends React.Component {
+ static async getInitialProps({ query }) {
+ return { query };
+ }
+
render() {
const page = parseInt(this.props.query.page) || 1;
console.log(this.props);