diff options
| author | Wes Bos <wesbos@gmail.com> | 2018-09-13 14:18:56 -0400 |
|---|---|---|
| committer | Wes Bos <wesbos@gmail.com> | 2018-09-13 14:18:56 -0400 |
| commit | 8a5825d52271d712ec7c8348447d433067e13ef2 (patch) | |
| tree | ba07c218c1b2d4e59c154f2059b69fd858ae65fe /finished-application/frontend/components/Item.js | |
| parent | b0d25a9ad3cc1df2fcc11ddb84e4603b94520b09 (diff) | |
DONE
Diffstat (limited to 'finished-application/frontend/components/Item.js')
| -rw-r--r-- | finished-application/frontend/components/Item.js | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/finished-application/frontend/components/Item.js b/finished-application/frontend/components/Item.js deleted file mode 100644 index d6b339e..0000000 --- a/finished-application/frontend/components/Item.js +++ /dev/null @@ -1,53 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import Link from 'next/link'; -import Title from './styles/Title'; -import AddToCart from './AddToCart'; -import DeleteItem from './DeleteItem'; -import formatMoney from '../lib/formatMoney'; -import ItemStyles from './styles/ItemStyles'; -import PriceTag from './styles/PriceTag'; - -class Item extends React.Component { - static propTypes = { - item: PropTypes.object.isRequired, - }; - - render() { - const item = this.props.item; - return ( - <ItemStyles key={item.id}> - {item.image && <img src={item.image} alt={item.title} />} - <Title> - <Link - href={{ - pathname: '/item', - query: { id: item.id }, - }} - > - <a>{item.title}</a> - </Link> - </Title> - - <PriceTag>{formatMoney(item.price)}</PriceTag> - - <p>{item.description}</p> - - <div className="buttonList"> - <Link - href={{ - pathname: '/update', - query: { id: item.id }, - }} - > - <a>Edit ✏️</a> - </Link> - <AddToCart id={item.id} /> - <DeleteItem id={item.id} /> - </div> - </ItemStyles> - ); - } -} - -export default Item; |
