From 8a5825d52271d712ec7c8348447d433067e13ef2 Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Thu, 13 Sep 2018 14:18:56 -0400 Subject: DONE --- .../frontend/components/CartItem.js | 53 ---------------------- 1 file changed, 53 deletions(-) delete mode 100644 finished-application/frontend/components/CartItem.js (limited to 'finished-application/frontend/components/CartItem.js') diff --git a/finished-application/frontend/components/CartItem.js b/finished-application/frontend/components/CartItem.js deleted file mode 100644 index 6c6d575..0000000 --- a/finished-application/frontend/components/CartItem.js +++ /dev/null @@ -1,53 +0,0 @@ -import styled from 'styled-components'; -import PropTypes from 'prop-types'; -import formatMoney from '../lib/formatMoney'; -import RemoveFromCart from './RemoveFromCart'; - -const CartItemStyles = styled.li` - padding: 1rem 0; - border-bottom: 1px solid ${props => props.theme.lightgrey}; - display: grid; - align-items: center; - grid-template-columns: auto 1fr auto; - img { - margin-right: 10px; - } - h3 { - margin: 0; - } - p { - margin: 0; - } -`; - -const CartItem = ({ cartItem }) => { - if (!cartItem.item) - return ( - -

Ack! That Item is gone!

- -
- ); - return ( - - {cartItem.item.title} -
-

{cartItem.item.title}

-

- {formatMoney(cartItem.quantity * cartItem.item.price)} - {' — '} - - {cartItem.quantity} × {formatMoney(cartItem.item.price)} each - -

-
- -
- ); -}; - -CartItem.propTypes = { - cartItem: PropTypes.object.isRequired, -}; - -export default CartItem; -- cgit v1.3