From f2e0263ee2d32b156a7a3b14770b897801c87553 Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Wed, 16 May 2018 13:55:34 -0400 Subject: last TODO --- frontend/components/Cart.js | 8 ++++++-- frontend/components/TakeMyMoney.js | 1 - 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'frontend/components') diff --git a/frontend/components/Cart.js b/frontend/components/Cart.js index 059ec39..2230a0e 100644 --- a/frontend/components/Cart.js +++ b/frontend/components/Cart.js @@ -4,7 +4,11 @@ import { adopt } from 'react-adopt'; import TakeMyMoney from './TakeMyMoney'; import formatMoney from '../lib/formatMoney'; import CartItem from './CartItem'; -import { CURRENT_USER_QUERY, LOCAL_STATE_QUERY, TOGGLE_CART_MUTATION } from '../queries/queries.graphql'; +import { + CURRENT_USER_QUERY, + LOCAL_STATE_QUERY, + TOGGLE_CART_MUTATION, +} from '../queries/queries.graphql'; import calcTotalPrice from '../lib/calcTotalPrice'; import Error from './ErrorMessage'; import CartStyles from './styles/CartStyles'; @@ -28,7 +32,7 @@ const Cart = () => ( const { data: { me }, error, loading } = currentUser; if (loading) return

Loading...

; if (error) return ; - if (!me) return

Please Sign In!

; + if (!me) return null; return (
diff --git a/frontend/components/TakeMyMoney.js b/frontend/components/TakeMyMoney.js index 4675cfe..fef90de 100644 --- a/frontend/components/TakeMyMoney.js +++ b/frontend/components/TakeMyMoney.js @@ -27,7 +27,6 @@ class TakeMyMoney extends Component { query: { id }, }); }; - // TODO - refetchQueries after an order is created render() { return ( -- cgit v1.3