diff options
Diffstat (limited to 'frontend/components')
| -rw-r--r-- | frontend/components/Cart.js | 8 | ||||
| -rw-r--r-- | frontend/components/TakeMyMoney.js | 1 |
2 files changed, 6 insertions, 3 deletions
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 <p>Loading...</p>; if (error) return <Error error={error} />; - if (!me) return <p>Please Sign In!</p>; + if (!me) return null; return ( <CartStyles open={localState.data.cartOpen}> <header> 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 ( <Query query={CURRENT_USER_QUERY}> |
