summaryrefslogtreecommitdiffstats
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
parent235969d8b25a6b9b4eaaaa2a54d088d2bb0e6def (diff)
parent3b42102026a00a290bfff5a4c9bd3eb8452ef97d (diff)
Merged with master
-rw-r--r--backend/README.md33
-rw-r--r--backend/src/resolvers/Query.js1
-rw-r--r--frontend/pages/_app.js1
-rw-r--r--frontend/pages/add.js10
-rw-r--r--frontend/pages/index.js8
5 files changed, 17 insertions, 36 deletions
diff --git a/backend/README.md b/backend/README.md
index 56c5b9c..cce3c38 100644
--- a/backend/README.md
+++ b/backend/README.md
@@ -1,32 +1,7 @@
-What are all these files?!
-
-What are the steps:
-
-
-When you want to add a new function:
-
-1. Open your `schema.graphql` and add it to the mutatiions
-2. Add a mutation resolver to match that new mutation:
-
- ```
- addToCart(parent, args, ctx, info) {
- console.log('ADding an item to cart!');
- },
- ```
-3. Create a client-side Mutation that will accept the arguments and call it
-
-
-### Installing Docker
-
-1. download docker
-1. run `prisma local start`
-1. Run `prisma deploy`
-
-if in trouble, run `prisma local nuke`
-
-
-
+what
+<!--
### Cloudinary
1. go to your settings and turn on unsigned uploading
-2.
+2. -->
+
diff --git a/backend/src/resolvers/Query.js b/backend/src/resolvers/Query.js
index 0cec090..276f7fa 100644
--- a/backend/src/resolvers/Query.js
+++ b/backend/src/resolvers/Query.js
@@ -4,7 +4,6 @@ const { forwardTo } = require('prisma-binding');
const Query = {
items(parent, args, ctx, info) {
- console.log(args);
return ctx.db.query.items({ ...args }, info);
},
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;