Guest User

Untitled

a guest
Jul 18th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. import React from "react";
  2. import PropTypes from "prop-types";
  3.  
  4. //TODO: container
  5. import CartList from "../containers/CartList";
  6. import CartSummary from "../containers/CartSummary";
  7.  
  8. export default function Cart(props) {
  9. return (
  10. <div>
  11. <h2>Cart</h2>
  12.  
  13. <button onClick={ ()=> props.addItem()}>
  14. Add
  15. </button>
  16.  
  17. {/* actions.empty is a bindactioncreator method */}
  18. <button onClick={ ()=> props.actions.empty()}>
  19. Empty
  20. </button>
  21.  
  22.  
  23.  
  24. <CartList
  25. />
  26.  
  27. <CartSummary
  28. />
  29.  
  30.  
  31. </div>
  32. )
  33. }
  34.  
  35.  
  36. Cart.defaultProps = {
  37.  
  38. }
  39.  
  40. Cart.propTypes = {
  41.  
  42. }
Add Comment
Please, Sign In to add comment