summaryrefslogtreecommitdiffstats
path: root/frontend/components/AddToCart.js
diff options
context:
space:
mode:
authorWes Bos <wesbos@gmail.com>2018-03-14 21:00:08 -0400
committerWes Bos <wesbos@gmail.com>2018-03-14 21:00:08 -0400
commitbd45d4c7aac6d1c6b054185058a96b2e01669828 (patch)
treeaeee19f26cc846496213822b6b28c9aa223bc6d1 /frontend/components/AddToCart.js
parent7c760dd4d1e27180222d3d524949216e5b65194a (diff)
tests
Diffstat (limited to 'frontend/components/AddToCart.js')
-rw-r--r--frontend/components/AddToCart.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/frontend/components/AddToCart.js b/frontend/components/AddToCart.js
index 9c52f83..22cfe02 100644
--- a/frontend/components/AddToCart.js
+++ b/frontend/components/AddToCart.js
@@ -14,13 +14,11 @@ class AddToCart extends Component {
}
handleAddToCart = async () => {
- console.log(`Gonna add this item to the cart! ${this.props.id}`);
const res = await this.props.addToCart({
variables: {
id: this.props.id,
},
});
- // this.props.currentUser.refetch();
};
render() {
@@ -28,4 +26,11 @@ class AddToCart extends Component {
}
}
+AddToCart.propTypes = {
+ currentUser: PropTypes.object.isRequired,
+ addToCart: PropTypes.func.isRequired,
+ id: PropTypes.string.isRequired,
+};
+
export default compose(userEnhancer, addToCartEnhancer)(AddToCart);
+export { AddToCart };