summaryrefslogtreecommitdiffstats
path: root/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'frontend')
-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;