From 8f2c595eca30e2d7138c8e8d6685774a8f44e55d Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Thu, 15 Feb 2018 16:59:58 -0500 Subject: omg --- frontend/components/TakeMyMoney.js | 37 ++++++++++++------------------------- 1 file changed, 12 insertions(+), 25 deletions(-) (limited to 'frontend/components/TakeMyMoney.js') diff --git a/frontend/components/TakeMyMoney.js b/frontend/components/TakeMyMoney.js index 30a19dc..5bdc409 100644 --- a/frontend/components/TakeMyMoney.js +++ b/frontend/components/TakeMyMoney.js @@ -7,22 +7,12 @@ import formatMoney from '../lib/formatMoney'; class TakeMyMoney extends Component { onToken = async res => { console.log('We got a toooken!'); - console.log(res); const order = await this.props.createOrder({ variables: { token: res.id, }, }); console.log(order); - // const token = res.id; - // const userId = this.props.currentUserQuery.user.id; - // const itemId = this.props.id; - // console.log(`Going to make a purchase with ${token}`); - // console.log(`THe person that bought this was ${userId}`); - // console.log(`The item id is ${itemId}`); - // const charge = await this.props.createOrder({ variables: { token, userId, itemId } }); - // alert(`Back from the charge! ${charge.id}`); - // console.log(charge); }; render() { @@ -31,21 +21,18 @@ class TakeMyMoney extends Component { const total = me.cart.reduce((tally, cartItem) => tally + cartItem.item.price * cartItem.quantity, 0); const totalItems = me.cart.reduce((tally, cartItem) => tally + cartItem.quantity, 0); return ( -
- - {formatMoney(total)} - {this.props.children} - -
+ + {this.props.children} + ); } } -- cgit v1.3