From bd45d4c7aac6d1c6b054185058a96b2e01669828 Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Wed, 14 Mar 2018 21:00:08 -0400 Subject: tests --- frontend/components/AddToCart.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'frontend/components/AddToCart.js') 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 }; -- cgit v1.3