summaryrefslogtreecommitdiffstats
path: root/frontend/components/Cart.js
diff options
context:
space:
mode:
authorWes Bos <wesbos@gmail.com>2018-05-16 13:55:34 -0400
committerWes Bos <wesbos@gmail.com>2018-05-16 13:55:34 -0400
commitf2e0263ee2d32b156a7a3b14770b897801c87553 (patch)
tree1879b47e2afa8c1c7eff2f7c65ec4a9a6d5b9462 /frontend/components/Cart.js
parentfceade857ecccad6884fe03a973215bd9df1a1e7 (diff)
last TODO
Diffstat (limited to 'frontend/components/Cart.js')
-rw-r--r--frontend/components/Cart.js8
1 files changed, 6 insertions, 2 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>