├── .gitignore ├── Materials ├── Colours.pdf └── wavey-design-by-piotr-medycki.jpg ├── README.md ├── code-along ├── .gitignore ├── .prettierrc ├── craco.config.js ├── package-lock.json ├── package.json ├── public │ ├── favicon.ico │ ├── index.html │ ├── manifest.json │ └── robots.txt ├── src │ ├── App.js │ ├── components │ │ ├── Benefits │ │ │ ├── Benefits.jsx │ │ │ └── index.js │ │ ├── BenefitsItem │ │ │ ├── BenefitsItem.jsx │ │ │ └── index.js │ │ ├── BrandLink │ │ │ ├── BrandLink.css │ │ │ ├── BrandLink.jsx │ │ │ └── index.js │ │ ├── ButtonLink │ │ │ ├── ButtonLink.jsx │ │ │ └── index.js │ │ ├── CartButton │ │ │ ├── CartButton.css │ │ │ ├── CartButton.jsx │ │ │ └── index.js │ │ ├── CategoriesBar │ │ │ ├── CategoriesBar.jsx │ │ │ └── index.js │ │ ├── Dropdown │ │ │ ├── Dropdown.jsx │ │ │ └── index.js │ │ ├── FactNumber │ │ │ ├── FactNumber.jsx │ │ │ └── index.js │ │ ├── Footer │ │ │ ├── Footer.css │ │ │ ├── Footer.jsx │ │ │ └── index.js │ │ ├── HeaderBanner │ │ │ ├── HeaderBanner.jsx │ │ │ ├── banner.png │ │ │ └── index.js │ │ ├── Icons │ │ │ ├── CartIcon.jsx │ │ │ ├── FacebookIcon.jsx │ │ │ ├── HeartIcon.jsx │ │ │ ├── InstagramIcon.jsx │ │ │ └── TwitterIcon.jsx │ │ ├── Loader │ │ │ ├── Loader.jsx │ │ │ └── index.js │ │ ├── MainBanner │ │ │ ├── MainBanner.css │ │ │ ├── MainBanner.jsx │ │ │ ├── banner.png │ │ │ └── index.js │ │ ├── NavLinks │ │ │ ├── NavLinks.css │ │ │ ├── NavLinks.jsx │ │ │ └── index.js │ │ ├── Navbar │ │ │ ├── Navbar.css │ │ │ ├── Navbar.jsx │ │ │ └── index.js │ │ ├── Price │ │ │ ├── Price.jsx │ │ │ └── index.js │ │ ├── PriceRange │ │ │ ├── PriceRange.jsx │ │ │ └── index.js │ │ ├── Product │ │ │ ├── Description.jsx │ │ │ ├── Image.jsx │ │ │ ├── Info.jsx │ │ │ ├── Product.jsx │ │ │ ├── Title.jsx │ │ │ └── index.js │ │ ├── ProductCard │ │ │ ├── ProductCard.jsx │ │ │ └── index.js │ │ ├── Products │ │ │ ├── Products.jsx │ │ │ └── index.js │ │ ├── RecommendedProducts │ │ │ ├── RecommendedProducts.jsx │ │ │ └── index.js │ │ ├── Search │ │ │ ├── Search.jsx │ │ │ └── index.js │ │ ├── SecondaryBanner │ │ │ ├── SecondaryBanner.css │ │ │ ├── SecondaryBanner.jsx │ │ │ ├── banner.png │ │ │ └── index.js │ │ ├── SectionTitle │ │ │ ├── SectionTitle.jsx │ │ │ └── index.js │ │ ├── SideBar │ │ │ ├── SideBar.jsx │ │ │ └── index.js │ │ ├── TopProducts │ │ │ ├── TopProducts.jsx │ │ │ └── index.js │ │ └── UniqueSellingPoint │ │ │ ├── UniqueSellingPoint.jsx │ │ │ ├── img.jpg │ │ │ └── index.js │ ├── constants │ │ ├── brands.js │ │ ├── categories.js │ │ ├── sorting.js │ │ └── tags.js │ ├── data │ │ └── footerLinks.json │ ├── hooks │ │ ├── useGetProduct.js │ │ ├── useGetRecommendedProducts.js │ │ ├── useGetTopProducts.js │ │ └── useSearch.js │ ├── index.css │ ├── index.js │ ├── logo.svg │ ├── pages │ │ ├── About.jsx │ │ ├── Home.jsx │ │ ├── Product.jsx │ │ └── Search.jsx │ ├── reportWebVitals.js │ ├── setupTests.js │ └── state │ │ ├── actionCreators.js │ │ ├── actionTypes.js │ │ ├── search-context.js │ │ ├── search-reducer.js │ │ └── search-state.js └── tailwind.config.js └── starter-files ├── .DS_Store ├── package.json ├── public ├── favicon.ico ├── index.html ├── manifest.json └── robots.txt └── src ├── .DS_Store ├── App.js ├── index.css ├── index.js ├── logo.svg ├── reportWebVitals.js └── setupTests.js /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /Materials/Colours.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danascript/react-makeup-app/e81d1176957bd79210f0f33826a1afaba8ce3cbb/Materials/Colours.pdf -------------------------------------------------------------------------------- /Materials/wavey-design-by-piotr-medycki.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danascript/react-makeup-app/e81d1176957bd79210f0f33826a1afaba8ce3cbb/Materials/wavey-design-by-piotr-medycki.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## REACT MAKEUP APP 2 | 3 | This is a code along project where we code live on streams an Makeup Website using the following: 4 | 5 | - ReactJS (+ Context API, hooks and routing) 6 | - TailwindCSS 7 | - Axios 8 | - Makeup API (REST) 9 | - and probably some more things 10 | 11 | You can find the code-along streams on my [YouTube channel](https://www.youtube.com/c/danascript/). 12 | 13 | Here is a list of recommended reading/watching material to help you kickstart this project with a bit of knowledge: 14 | 15 | 1. [Tailwind CSS 101](https://blog.tailwindcss.com/tailwindcss-from-zero-to-production) 16 | 2. [Flux: explanation about Store, Dispatcher, View and Action](https://www.freecodecamp.org/news/an-introduction-to-the-flux-architectural-pattern-674ea74775c9/) 17 | 18 | 19 | If some of the things are too complex, then don't worry! We're here to learn and grow together, feel free to ask question during the stream to help yourself and everyone else too! :heart: -------------------------------------------------------------------------------- /code-along/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /code-along/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "arrowParens": "avoid", 3 | "bracketSpacing": true, 4 | "printWidth": 120, 5 | "semi": true, 6 | "singleQuote": true, 7 | "tabWidth": 4, 8 | "trailingComma": "es5", 9 | "useTabs": false 10 | } -------------------------------------------------------------------------------- /code-along/craco.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | style: { 3 | postcss: { 4 | plugins: [require('tailwindcss'), require('autoprefixer')], 5 | }, 6 | }, 7 | }; 8 | -------------------------------------------------------------------------------- /code-along/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-makeup-app", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "craco start", 7 | "build": "craco build", 8 | "test": "craco test", 9 | "eject": "react-scripts eject" 10 | }, 11 | "dependencies": { 12 | "@craco/craco": "^6.2.0", 13 | "@testing-library/jest-dom": "^5.11.4", 14 | "@testing-library/react": "^11.1.0", 15 | "@testing-library/user-event": "^12.1.10", 16 | "axios": "^0.21.1", 17 | "prop-types": "^15.7.2", 18 | "react": "^17.0.2", 19 | "react-dom": "^17.0.2", 20 | "react-router-dom": "^5.2.0", 21 | "react-scripts": "4.0.3", 22 | "web-vitals": "^1.0.1" 23 | }, 24 | "devDependencies": { 25 | "autoprefixer": "^9.8.6", 26 | "postcss": "^7.0.35", 27 | "tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.7" 28 | }, 29 | "eslintConfig": { 30 | "extends": [ 31 | "react-app", 32 | "react-app/jest" 33 | ] 34 | }, 35 | "browserslist": { 36 | "production": [ 37 | ">0.2%", 38 | "not dead", 39 | "not op_mini all" 40 | ], 41 | "development": [ 42 | "last 1 chrome version", 43 | "last 1 firefox version", 44 | "last 1 safari version" 45 | ] 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /code-along/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danascript/react-makeup-app/e81d1176957bd79210f0f33826a1afaba8ce3cbb/code-along/public/favicon.ico -------------------------------------------------------------------------------- /code-along/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | 28 | 29 | 30 | 31 | React App 32 | 33 | 34 | 35 |
36 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /code-along/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } -------------------------------------------------------------------------------- /code-along/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /code-along/src/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { BrowserRouter as Router, Switch, Route } from 'react-router-dom'; 3 | 4 | import Navbar from './components/Navbar'; 5 | import Footer from './components/Footer'; 6 | 7 | import Home from './pages/Home'; 8 | import About from './pages/About'; 9 | import Search from './pages/Search'; 10 | import Product from './pages/Product'; 11 | 12 | export default function App() { 13 | return ( 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |