summaryrefslogtreecommitdiffstats
path: root/frontend/pages
diff options
context:
space:
mode:
authorLuis Alvarez <luisito453@gmail.com>2018-05-15 17:31:17 -0500
committerLuis Alvarez <luisito453@gmail.com>2018-05-15 17:31:17 -0500
commit51cc382a14ad3f368873239b1b642a3cec0470c1 (patch)
treed5d3f12d7c4dc2adce73c399edb08961d99e1d8e /frontend/pages
parent235969d8b25a6b9b4eaaaa2a54d088d2bb0e6def (diff)
parent3b42102026a00a290bfff5a4c9bd3eb8452ef97d (diff)
Merged with master
Diffstat (limited to 'frontend/pages')
-rw-r--r--frontend/pages/_app.js1
-rw-r--r--frontend/pages/add.js10
-rw-r--r--frontend/pages/index.js8
3 files changed, 13 insertions, 6 deletions
diff --git a/frontend/pages/_app.js b/frontend/pages/_app.js
index fce2aa5..8857120 100644
--- a/frontend/pages/_app.js
+++ b/frontend/pages/_app.js
@@ -11,7 +11,6 @@ import Page from '../components/Page';
class MyApp extends App {
componentDidMount() {
if (typeof window !== 'undefined' && !window.__CLIENTLOADED__) {
- console.log('Refetching current user');
this.props.apollo.query({ query: CURRENT_USER_QUERY, fetchPolicy: 'network-only' });
window.__CLIENTLOADED__ = true;
}
diff --git a/frontend/pages/add.js b/frontend/pages/add.js
new file mode 100644
index 0000000..57a327d
--- /dev/null
+++ b/frontend/pages/add.js
@@ -0,0 +1,10 @@
+import CreateItem from '../components/CreateItem';
+import PleaseSignIn from '../components/PleaseSignIn';
+
+const Sell = () => (
+ <PleaseSignIn>
+ <CreateItem />
+ </PleaseSignIn>
+);
+
+export default Sell;
diff --git a/frontend/pages/index.js b/frontend/pages/index.js
index 635142a..d316108 100644
--- a/frontend/pages/index.js
+++ b/frontend/pages/index.js
@@ -1,9 +1,7 @@
import Items from '../components/Items';
-const Home = props => {
- const page = parseInt(props.query.page) || 1;
- console.log(props);
- return <Items page={page} />
-}
+const Home = props => (
+ <Items page={parseInt(props.query.page) || 1} />
+)
export default Home;