├── .prettierrc
├── src
├── services
│ ├── sort
│ │ ├── actionTypes.js
│ │ ├── actions.js
│ │ ├── reducer.js
│ │ └── __tests__
│ │ │ └── actions.test.js
│ ├── total
│ │ ├── actionTypes.js
│ │ ├── reducer.js
│ │ └── actions.js
│ ├── filters
│ │ ├── actionTypes.js
│ │ ├── actions.js
│ │ ├── reducer.js
│ │ └── __tests__
│ │ │ └── actions.test.js
│ ├── shelf
│ │ ├── actionTypes.js
│ │ ├── reducer.js
│ │ └── actions.js
│ ├── cart
│ │ ├── actionTypes.js
│ │ ├── actions.js
│ │ ├── reducer.js
│ │ └── __tests__
│ │ │ └── actions.test.js
│ ├── util.js
│ ├── __tests__
│ │ └── util.test.js
│ ├── reducers.js
│ └── store.js
├── static
│ ├── bag-icon.png
│ ├── instagram-icon.png
│ ├── products
│ │ ├── 100_1.jpg
│ │ ├── 100_2.jpg
│ │ ├── 101_1.jpg
│ │ ├── 101_2.jpg
│ │ ├── 10412368723880252_1.jpg
│ │ ├── 10412368723880252_2.jpg
│ │ ├── 10547961582846888_1.jpg
│ │ ├── 10547961582846888_2.jpg
│ │ ├── 10686354557628304_1.jpg
│ │ ├── 10686354557628304_2.jpg
│ │ ├── 11033926921508488_1.jpg
│ │ ├── 11033926921508488_2.jpg
│ │ ├── 11600983276356164_1.jpg
│ │ ├── 11600983276356164_2.jpg
│ │ ├── 11854078013954528_1.jpg
│ │ ├── 11854078013954528_2.jpg
│ │ ├── 12064273040195392_1.jpg
│ │ ├── 12064273040195392_2.jpg
│ │ ├── 18532669286405344_1.jpg
│ │ ├── 18532669286405344_2.jpg
│ │ ├── 18644119330491310_1.jpg
│ │ ├── 18644119330491310_2.jpg
│ │ ├── 27250082398145996_1.jpg
│ │ ├── 27250082398145996_2.jpg
│ │ ├── 39876704341265610_1.jpg
│ │ ├── 39876704341265610_2.jpg
│ │ ├── 51498472915966370_1.jpg
│ │ ├── 51498472915966370_2.jpg
│ │ ├── 5619496040738316_1.jpg
│ │ ├── 5619496040738316_2.jpg
│ │ ├── 6090484789343891_1.jpg
│ │ ├── 6090484789343891_2.jpg
│ │ ├── 8552515751438644_1.jpg
│ │ ├── 8552515751438644_2.jpg
│ │ ├── 876661122392077_1.jpg
│ │ ├── 876661122392077_2.jpg
│ │ ├── 9197907543445676_1.jpg
│ │ └── 9197907543445676_2.jpg
│ └── sprite_delete-icon.png
├── components
│ ├── Spinner
│ │ ├── __tests__
│ │ │ └── Spinner.test.js
│ │ ├── index.js
│ │ └── style.scss
│ ├── Thumb
│ │ ├── __tests__
│ │ │ └── Thumb.tests.js
│ │ └── index.js
│ ├── Shelf
│ │ ├── ProductList
│ │ │ ├── index.js
│ │ │ └── Product
│ │ │ │ ├── __tests__
│ │ │ │ └── Product.test.js
│ │ │ │ └── index.js
│ │ ├── Sort
│ │ │ ├── __tests__
│ │ │ │ └── Sort.test.js
│ │ │ └── index.js
│ │ ├── Filter
│ │ │ ├── __tests__
│ │ │ │ └── Filter.test.js
│ │ │ ├── index.js
│ │ │ └── style.scss
│ │ ├── ShelfHeader
│ │ │ ├── __tests__
│ │ │ │ └── ShelfHeader.test.js
│ │ │ └── index.js
│ │ ├── __tests__
│ │ │ └── Shelf.test.js
│ │ ├── index.js
│ │ └── style.scss
│ ├── App
│ │ ├── index.js
│ │ └── __tests__
│ │ │ └── App.test.js
│ ├── github
│ │ ├── style.css
│ │ ├── StarButton.js
│ │ └── Corner.js
│ ├── Selectbox
│ │ ├── __tests__
│ │ │ └── Selectbox.test.js
│ │ └── index.js
│ ├── Checkbox
│ │ ├── __tests__
│ │ │ └── Checkbox.test.js
│ │ └── index.js
│ └── FloatCart
│ │ ├── CartProduct
│ │ ├── __tests__
│ │ │ └── CartProduct.test.js
│ │ └── index.js
│ │ ├── __tests__
│ │ └── FloatCart.test.js
│ │ ├── style.scss
│ │ └── index.js
├── Root.js
├── index.js
├── setupTests.js
├── index.scss
└── __tests__
│ └── integrations.test.js
├── .firebaserc
├── public
├── favicon.ico
├── manifest.json
├── index.html
└── normalize.css
├── doc
├── react-shopping-cart.gif
└── react-shopping-cart-min.gif
├── firebase.json
├── .editorconfig
├── .gitignore
├── server
├── app.js
└── data
│ └── products.json
├── .circleci
└── config.yml
├── LICENSE.md
├── e2e
└── test.js
├── package.json
├── .all-contributorsrc
├── .firebase
└── hosting.YnVpbGQ.cache
├── README.md
└── wdio.conf.js
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "singleQuote": true
3 | }
4 |
--------------------------------------------------------------------------------
/src/services/sort/actionTypes.js:
--------------------------------------------------------------------------------
1 | export const UPDATE_SORT = 'UPDATE_SORT';
2 |
--------------------------------------------------------------------------------
/src/services/total/actionTypes.js:
--------------------------------------------------------------------------------
1 | export const UPDATE_CART = 'UPDATE_CART';
2 |
--------------------------------------------------------------------------------
/src/services/filters/actionTypes.js:
--------------------------------------------------------------------------------
1 | export const UPDATE_FILTER = 'UPDATE_FILTER';
2 |
--------------------------------------------------------------------------------
/src/services/shelf/actionTypes.js:
--------------------------------------------------------------------------------
1 | export const FETCH_PRODUCTS = 'FETCH_PRODUCTS';
2 |
--------------------------------------------------------------------------------
/.firebaserc:
--------------------------------------------------------------------------------
1 | {
2 | "projects": {
3 | "default": "react-shopping-cart-67954"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/public/favicon.ico
--------------------------------------------------------------------------------
/src/static/bag-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/bag-icon.png
--------------------------------------------------------------------------------
/doc/react-shopping-cart.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/doc/react-shopping-cart.gif
--------------------------------------------------------------------------------
/src/static/instagram-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/instagram-icon.png
--------------------------------------------------------------------------------
/src/static/products/100_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/100_1.jpg
--------------------------------------------------------------------------------
/src/static/products/100_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/100_2.jpg
--------------------------------------------------------------------------------
/src/static/products/101_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/101_1.jpg
--------------------------------------------------------------------------------
/src/static/products/101_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/101_2.jpg
--------------------------------------------------------------------------------
/doc/react-shopping-cart-min.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/doc/react-shopping-cart-min.gif
--------------------------------------------------------------------------------
/src/static/sprite_delete-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/sprite_delete-icon.png
--------------------------------------------------------------------------------
/src/static/products/10412368723880252_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/10412368723880252_1.jpg
--------------------------------------------------------------------------------
/src/static/products/10412368723880252_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/10412368723880252_2.jpg
--------------------------------------------------------------------------------
/src/static/products/10547961582846888_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/10547961582846888_1.jpg
--------------------------------------------------------------------------------
/src/static/products/10547961582846888_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/10547961582846888_2.jpg
--------------------------------------------------------------------------------
/src/static/products/10686354557628304_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/10686354557628304_1.jpg
--------------------------------------------------------------------------------
/src/static/products/10686354557628304_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/10686354557628304_2.jpg
--------------------------------------------------------------------------------
/src/static/products/11033926921508488_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/11033926921508488_1.jpg
--------------------------------------------------------------------------------
/src/static/products/11033926921508488_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/11033926921508488_2.jpg
--------------------------------------------------------------------------------
/src/static/products/11600983276356164_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/11600983276356164_1.jpg
--------------------------------------------------------------------------------
/src/static/products/11600983276356164_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/11600983276356164_2.jpg
--------------------------------------------------------------------------------
/src/static/products/11854078013954528_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/11854078013954528_1.jpg
--------------------------------------------------------------------------------
/src/static/products/11854078013954528_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/11854078013954528_2.jpg
--------------------------------------------------------------------------------
/src/static/products/12064273040195392_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/12064273040195392_1.jpg
--------------------------------------------------------------------------------
/src/static/products/12064273040195392_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/12064273040195392_2.jpg
--------------------------------------------------------------------------------
/src/static/products/18532669286405344_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/18532669286405344_1.jpg
--------------------------------------------------------------------------------
/src/static/products/18532669286405344_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/18532669286405344_2.jpg
--------------------------------------------------------------------------------
/src/static/products/18644119330491310_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/18644119330491310_1.jpg
--------------------------------------------------------------------------------
/src/static/products/18644119330491310_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/18644119330491310_2.jpg
--------------------------------------------------------------------------------
/src/static/products/27250082398145996_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/27250082398145996_1.jpg
--------------------------------------------------------------------------------
/src/static/products/27250082398145996_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/27250082398145996_2.jpg
--------------------------------------------------------------------------------
/src/static/products/39876704341265610_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/39876704341265610_1.jpg
--------------------------------------------------------------------------------
/src/static/products/39876704341265610_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/39876704341265610_2.jpg
--------------------------------------------------------------------------------
/src/static/products/51498472915966370_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/51498472915966370_1.jpg
--------------------------------------------------------------------------------
/src/static/products/51498472915966370_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/51498472915966370_2.jpg
--------------------------------------------------------------------------------
/src/static/products/5619496040738316_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/5619496040738316_1.jpg
--------------------------------------------------------------------------------
/src/static/products/5619496040738316_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/5619496040738316_2.jpg
--------------------------------------------------------------------------------
/src/static/products/6090484789343891_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/6090484789343891_1.jpg
--------------------------------------------------------------------------------
/src/static/products/6090484789343891_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/6090484789343891_2.jpg
--------------------------------------------------------------------------------
/src/static/products/8552515751438644_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/8552515751438644_1.jpg
--------------------------------------------------------------------------------
/src/static/products/8552515751438644_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/8552515751438644_2.jpg
--------------------------------------------------------------------------------
/src/static/products/876661122392077_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/876661122392077_1.jpg
--------------------------------------------------------------------------------
/src/static/products/876661122392077_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/876661122392077_2.jpg
--------------------------------------------------------------------------------
/src/static/products/9197907543445676_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/9197907543445676_1.jpg
--------------------------------------------------------------------------------
/src/static/products/9197907543445676_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sonnysangha/react-shopping-cart/HEAD/src/static/products/9197907543445676_2.jpg
--------------------------------------------------------------------------------
/src/services/sort/actions.js:
--------------------------------------------------------------------------------
1 | import { UPDATE_SORT } from './actionTypes';
2 |
3 | export const updateSort = sort => ({
4 | type: UPDATE_SORT,
5 | payload: sort
6 | });
7 |
--------------------------------------------------------------------------------
/src/services/filters/actions.js:
--------------------------------------------------------------------------------
1 | import { UPDATE_FILTER } from './actionTypes';
2 |
3 | export const updateFilters = filters => ({
4 | type: UPDATE_FILTER,
5 | payload: filters
6 | });
7 |
--------------------------------------------------------------------------------
/firebase.json:
--------------------------------------------------------------------------------
1 | {
2 | "hosting": {
3 | "public": "build",
4 | "ignore": [
5 | "firebase.json",
6 | "**/.*",
7 | "**/node_modules/**"
8 | ]
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/components/Spinner/__tests__/Spinner.test.js:
--------------------------------------------------------------------------------
1 | import Spinner from '../';
2 |
3 | it('mounts without crashing', () => {
4 | const wrapped = mount(
{product.title}
45 |{product.title}
69 |
70 | {`${product.availableSizes[0]} | ${product.style}`}
71 | Quantity: {product.quantity}
72 |
{`${product.currencyFormat} ${formatPrice(product.price)}`}
76 |
5 |
6 |
7 |
![]()
71 | A little project by Jefferson Ribeiro 72 |
73 | 74 | ## Contributors 75 | 76 | Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): 77 | 78 | 79 | 80 |Syed Saad Qamar 💻 |
83 | ksakiyama 💻 |
84 | Rithika Chowta 💻 |
85 | Chris Riesbeck 🤔 ✅ 🖋 👀 🐛 |
86 | Hay Tran 💻 🎨 |
87 |
159 | Add some products in the cart
160 | :)
161 |
169 | {`${cartTotal.currencyFormat} ${formatPrice( 170 | cartTotal.totalPrice, 171 | cartTotal.currencyId 172 | )}`} 173 |
174 | 175 | {!!cartTotal.installments && ( 176 | 177 | {`OR UP TO ${cartTotal.installments} x ${ 178 | cartTotal.currencyFormat 179 | } ${formatPrice( 180 | cartTotal.totalPrice / cartTotal.installments, 181 | cartTotal.currencyId 182 | )}`} 183 | 184 | )} 185 | 186 |