├── script.js ├── public ├── robots.txt ├── favicon.ico ├── logo192.png ├── logo512.png ├── manifest.json └── index.html ├── src ├── compoents │ ├── brand │ │ ├── style.css │ │ └── index.jsx │ ├── square │ │ ├── index.jsx │ │ └── style.css │ ├── card │ │ ├── style.css │ │ └── index.jsx │ ├── hero │ │ ├── style.css │ │ └── index.jsx │ ├── header │ │ ├── index.jsx │ │ └── styles.css │ └── main │ │ ├── styles.css │ │ └── index.jsx ├── assets │ └── imgs │ │ ├── alelo.png │ │ ├── elo.png │ │ ├── visa.png │ │ ├── Relume.png │ │ ├── Vector.png │ │ ├── mastercard.png │ │ ├── Arrow.svg │ │ ├── box.svg │ │ ├── Relume.svg │ │ ├── Logo.svg │ │ └── Placeholder Image.svg ├── pages │ └── home │ │ └── index.jsx ├── App.jsx ├── setupTests.js ├── App.test.js ├── class │ └── hooks │ │ ├── useEffect │ │ └── example │ │ │ └── index.jsx │ │ ├── useState │ │ ├── count │ │ │ └── index.jsx │ │ └── accordion │ │ │ ├── index.jsx │ │ │ └── styles.css │ │ └── useHooks │ │ ├── countEffect │ │ └── index.jsx │ │ ├── pokemonApi │ │ └── index.jsx │ │ └── postApi │ │ └── index.jsx ├── index.css ├── reportWebVitals.js ├── index.js ├── App.css ├── fundamentos │ ├── fundamentals.js │ └── exercises.js └── logo.svg ├── .gitignore ├── package.json └── README.md /script.js: -------------------------------------------------------------------------------- 1 | console.log('Estou funcionando') -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marianicacio/React-landpage/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marianicacio/React-landpage/HEAD/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marianicacio/React-landpage/HEAD/public/logo512.png -------------------------------------------------------------------------------- /src/compoents/brand/style.css: -------------------------------------------------------------------------------- 1 | .app-container img { 2 | width: 600px; 3 | height: 300px; 4 | } -------------------------------------------------------------------------------- /src/assets/imgs/alelo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marianicacio/React-landpage/HEAD/src/assets/imgs/alelo.png -------------------------------------------------------------------------------- /src/assets/imgs/elo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marianicacio/React-landpage/HEAD/src/assets/imgs/elo.png -------------------------------------------------------------------------------- /src/assets/imgs/visa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marianicacio/React-landpage/HEAD/src/assets/imgs/visa.png -------------------------------------------------------------------------------- /src/assets/imgs/Relume.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marianicacio/React-landpage/HEAD/src/assets/imgs/Relume.png -------------------------------------------------------------------------------- /src/assets/imgs/Vector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marianicacio/React-landpage/HEAD/src/assets/imgs/Vector.png -------------------------------------------------------------------------------- /src/assets/imgs/mastercard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marianicacio/React-landpage/HEAD/src/assets/imgs/mastercard.png -------------------------------------------------------------------------------- /src/pages/home/index.jsx: -------------------------------------------------------------------------------- 1 | import Header from "../../compoents/header"; 2 | 3 | export default function Home() { 4 | return ( 5 |
6 | ) 7 | } -------------------------------------------------------------------------------- /src/compoents/square/index.jsx: -------------------------------------------------------------------------------- 1 | import './style.css' 2 | 3 | export default function Square({color}) { 4 | return
5 | } -------------------------------------------------------------------------------- /src/App.jsx: -------------------------------------------------------------------------------- 1 | 2 | import PostApi from "./class/hooks/useHooks/postApi"; 3 | 4 | 5 | 6 | export default function App() { 7 | return ( 8 | 9 | ) 10 | } -------------------------------------------------------------------------------- /src/compoents/card/style.css: -------------------------------------------------------------------------------- 1 | .card-container { 2 | display: flex; 3 | flex-direction: column; 4 | align-items: flex-start; 5 | width: 406px; 6 | height: 226px; 7 | gap: 24px; 8 | } -------------------------------------------------------------------------------- /src/compoents/square/style.css: -------------------------------------------------------------------------------- 1 | .square { 2 | width: 200px; 3 | height: 200px; 4 | border: 1px solid black; 5 | } 6 | 7 | .square-red { 8 | background-color: red; 9 | } 10 | 11 | .square-green { 12 | background-color: green; 13 | } -------------------------------------------------------------------------------- /src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /src/class/hooks/useEffect/example/index.jsx: -------------------------------------------------------------------------------- 1 | import { useEffect } from "react" 2 | 3 | export default function Example() { 4 | 5 | useEffect(() => { 6 | console.log("useEffect rodando") 7 | },[]) 8 | 9 | return( 10 |

Sou um exemplo

11 | ) 12 | } -------------------------------------------------------------------------------- /src/compoents/hero/style.css: -------------------------------------------------------------------------------- 1 | .hero-container { 2 | display: flex; 3 | height: 864px; 4 | width: 100%; 5 | justify-content: center; 6 | align-items: center; 7 | gap: 80px; 8 | } 9 | 10 | .hero-container img { 11 | width: 516px; 12 | height: 540px; 13 | } 14 | 15 | .hero-right { 16 | flex-direction: row-reverse; 17 | } -------------------------------------------------------------------------------- /src/compoents/card/index.jsx: -------------------------------------------------------------------------------- 1 | import "./style.css" 2 | 3 | export default function Card({ title, description, image, imageAlt }) { 4 | return ( 5 |
6 |
7 | {imageAlt} 8 |

{title}

9 |

{description}

10 |
11 |
12 | ) 13 | } 14 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /src/class/hooks/useState/count/index.jsx: -------------------------------------------------------------------------------- 1 | import { useState } from "react" 2 | 3 | export default function Count() { 4 | 5 | const [count, setCount] = useState(0) 6 | 7 | //tradicional 8 | function handleCount() { 9 | setCount(count + 1) 10 | } 11 | 12 | return( 13 |
14 |

Você clicou {count} vezes

15 | 16 |
17 | ) 18 | } -------------------------------------------------------------------------------- /src/class/hooks/useHooks/countEffect/index.jsx: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from "react" 2 | 3 | export default function CountEffect() { 4 | 5 | const [count, setCount] = useState(0) 6 | 7 | useEffect(() => { 8 | console.log("useEffect aticado pela dependência count") 9 | }, [count]) 10 | 11 | return( 12 |
13 |

Você clicou {count} vezes

14 | 15 |
16 | ) 17 | } -------------------------------------------------------------------------------- /src/assets/imgs/Arrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import './index.css'; 4 | import App from './App'; 5 | import reportWebVitals from './reportWebVitals'; 6 | 7 | const root = ReactDOM.createRoot(document.getElementById('root')); 8 | root.render( 9 | 10 | 11 | 12 | ); 13 | 14 | // If you want to start measuring performance in your app, pass a function 15 | // to log results (for example: reportWebVitals(console.log)) 16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 17 | reportWebVitals(); 18 | -------------------------------------------------------------------------------- /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 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /src/compoents/hero/index.jsx: -------------------------------------------------------------------------------- 1 | import './style.css' 2 | import Alelo from "../../assets/imgs/Placeholder Image.svg" 3 | 4 | export default function Hero({aligment}) { 5 | return ( 6 |
7 | 8 |
9 |
Feature one
10 |

Describe benefit of feature one

11 |

Highlight Unique Selling Proposition (USP) with a short summary of the key feature and how it benefits customers.

12 | 13 |
14 |
15 | ) 16 | } -------------------------------------------------------------------------------- /src/compoents/header/index.jsx: -------------------------------------------------------------------------------- 1 | import './styles.css' 2 | import Logo from '../../../src/assets/imgs/Logo.svg' 3 | import Arrow from '../../../src/assets/imgs/Arrow.svg' 4 | 5 | export default function Header() { 6 | return ( 7 |
8 | 9 | 15 |
16 | 17 |
18 |
19 | ) 20 | } -------------------------------------------------------------------------------- /src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | .cards { 11 | display: flex; 12 | } 13 | 14 | @media (prefers-reduced-motion: no-preference) { 15 | .App-logo { 16 | animation: App-logo-spin infinite 20s linear; 17 | } 18 | } 19 | 20 | .App-header { 21 | background-color: #282c34; 22 | min-height: 100vh; 23 | display: flex; 24 | flex-direction: column; 25 | align-items: center; 26 | justify-content: center; 27 | font-size: calc(10px + 2vmin); 28 | color: white; 29 | } 30 | 31 | .App-link { 32 | color: #61dafb; 33 | } 34 | 35 | @keyframes App-logo-spin { 36 | from { 37 | transform: rotate(0deg); 38 | } 39 | to { 40 | transform: rotate(360deg); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/fundamentos/fundamentals.js: -------------------------------------------------------------------------------- 1 | function SomaNumeros(numeroOne, numeroTwo) { 2 | return numeroOne + numeroTwo 3 | } 4 | 5 | console.log(SomaNumeros(10, 20)) 6 | 7 | function MultiplicarNumeros(numeroOne, numeroTwo) { 8 | return numeroOne * numeroTwo 9 | } 10 | 11 | console.log(MultiplicarNumeros(2, 20)) 12 | 13 | function DivisãoNumeros(numeroOne, numeroTwo) { 14 | return numeroOne / numeroTwo 15 | } 16 | 17 | console.log(DivisãoNumeros(20, 2)) 18 | 19 | const person = { 20 | name: "Maria", 21 | age: "16 anos", 22 | gender: "Feminino" 23 | } 24 | 25 | // console.log(person.name) 26 | // console.log(person.age) 27 | // console.log(person.gender) 28 | 29 | const { age, gender, name } = person 30 | 31 | console.log(name) 32 | console.log(age) 33 | console.log(gender) -------------------------------------------------------------------------------- /src/class/hooks/useState/accordion/index.jsx: -------------------------------------------------------------------------------- 1 | import { useState } from "react" 2 | import { ArrowDown, ArrowUp } from "lucide-react" 3 | import './styles.css' 4 | 5 | export default function Accordion() { 6 | const [isOpen, setIsOpen] = useState(true) 7 | 8 | return ( 9 |
10 |
11 |

Novidade

12 | {/* Se estiver aberto é um icone, caso fechado outro */} 13 | 16 |
17 | {/* e-comercial pq eu n mostro nada caso estiver falso */} 18 | {isOpen && ( 19 |
20 |

Sei fazer um arccordion jsx com hooks

21 |
22 | )} 23 |
24 | ) 25 | } -------------------------------------------------------------------------------- /src/assets/imgs/box.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/compoents/main/styles.css: -------------------------------------------------------------------------------- 1 | main { 2 | display: flex; 3 | flex-direction: column; 4 | justify-content: center; 5 | align-items: center; 6 | } 7 | 8 | main img { 9 | width: 516px; 10 | height: 540px; 11 | } 12 | 13 | .main-container { 14 | display: flex; 15 | flex-direction: row-reverse; 16 | margin-top: 112px; 17 | gap: 80px; 18 | } 19 | 20 | h1 { 21 | font-size: 56px; 22 | width: 616px; 23 | } 24 | 25 | p { 26 | font-size: 18px; 27 | width: 616px; 28 | } 29 | 30 | .align { 31 | display: flex; 32 | gap: 16px; 33 | } 34 | 35 | input { 36 | width: 357px; 37 | height: 48px; 38 | font-size: 16px; 39 | color: #666666; 40 | } 41 | 42 | button { 43 | color: white; 44 | background-color: black; 45 | width: 140px; 46 | height: 52px; 47 | } 48 | 49 | .align-p p { 50 | width: 513px; 51 | height: 18px; 52 | font-size: 12px; 53 | } 54 | 55 | .img { 56 | display: flex; 57 | } -------------------------------------------------------------------------------- /src/assets/imgs/Relume.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/compoents/header/styles.css: -------------------------------------------------------------------------------- 1 | header { 2 | width: 100%; 3 | height: 72px; 4 | display: flex; 5 | align-items: center; 6 | justify-content: space-around; 7 | gap: 100px; 8 | border-bottom: 1.5px solid black; 9 | } 10 | 11 | nav { 12 | display: flex; 13 | align-items: center; 14 | justify-content: center; 15 | gap: 32px; 16 | } 17 | 18 | a { 19 | color: black; 20 | text-decoration: none; 21 | font-size: 16px; 22 | } 23 | 24 | img { 25 | width: 62px; 26 | } 27 | 28 | header button img{ 29 | width: 13px; 30 | height: 7px; 31 | } 32 | 33 | header button { 34 | background-color: transparent; 35 | border: none; 36 | } 37 | 38 | .button-get button { 39 | width: 132px; 40 | height: 40px; 41 | background-color: black; 42 | color: white; 43 | } 44 | 45 | .button-get:hover { 46 | width: 132px; 47 | height: 40px; 48 | background-color: #00256f; 49 | transition: 1s; 50 | border-radius: 50px; 51 | } 52 | -------------------------------------------------------------------------------- /src/compoents/main/index.jsx: -------------------------------------------------------------------------------- 1 | import "./styles.css" 2 | import MainImg from "../../../src/assets/imgs/Placeholder Image.svg" 3 | 4 | export default function Main() { 5 | return ( 6 |
7 |
8 | 9 |
10 |

Resonate with the visitor's problem

11 |

Describe exactly what your product or service does to solve this problem. Avoid using verbose words or phrases.

12 |
13 | 14 |
15 |
16 |

By clicking Sign Up you're confirming that you agree with our Terms and Conditions.

17 |
18 |
19 |
20 |
21 | ) 22 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@testing-library/jest-dom": "^5.17.0", 7 | "@testing-library/react": "^13.4.0", 8 | "@testing-library/user-event": "^13.5.0", 9 | "lucide-react": "^0.441.0", 10 | "react": "^18.3.1", 11 | "react-dom": "^18.3.1", 12 | "react-scripts": "^5.0.1", 13 | "web-vitals": "^2.1.4" 14 | }, 15 | "scripts": { 16 | "start": "react-scripts start", 17 | "build": "react-scripts build", 18 | "test": "react-scripts test", 19 | "eject": "react-scripts eject", 20 | "meuScript": "node ./script.js", 21 | "exercises": "node ./src/fundamentos/exercises.js" 22 | }, 23 | "eslintConfig": { 24 | "extends": [ 25 | "react-app", 26 | "react-app/jest" 27 | ] 28 | }, 29 | "browserslist": { 30 | "production": [ 31 | ">0.2%", 32 | "not dead", 33 | "not op_mini all" 34 | ], 35 | "development": [ 36 | "last 1 chrome version", 37 | "last 1 firefox version", 38 | "last 1 safari version" 39 | ] 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/class/hooks/useState/accordion/styles.css: -------------------------------------------------------------------------------- 1 | /* body { 2 | display: flex; 3 | justify-content: center; 4 | align-items: center; 5 | margin-top: 20px; 6 | background-color: #e0daf7; 7 | } */ 8 | 9 | .accordion-container { 10 | width: 300px; 11 | height: 70px; 12 | } 13 | 14 | .accordion-title { 15 | width: 100%; 16 | height: 100%; 17 | text-align: center; 18 | display: flex; 19 | justify-content: space-evenly; 20 | align-items: center; 21 | border: 1.5px solid purple; 22 | background-color: purple; 23 | color: white; 24 | } 25 | 26 | .accordion-content { 27 | display: flex; 28 | justify-content: center; 29 | width: 100%; 30 | height: 75px; 31 | align-items: center; 32 | border: 1.5px solid purple; 33 | background-color: #ffe6ff; 34 | } 35 | 36 | .accordion-content p { 37 | 38 | text-align: center; 39 | } 40 | 41 | .accordion-title button { 42 | background-color: transparent; 43 | border: white; 44 | width: 100px; 45 | height: 50px; 46 | } 47 | 48 | .accordion-title button :hover { 49 | transition: 1s; 50 | width: 35px; 51 | height: 35px; 52 | } -------------------------------------------------------------------------------- /src/compoents/brand/index.jsx: -------------------------------------------------------------------------------- 1 | // import './style.css' 2 | // import Visa from "../../assets/imgs/visa.png" 3 | // import Alelo from "../../assets/imgs/alelo.png" 4 | // import Elo from "../../assets/imgs/elo.png" 5 | // import MasterCard from "../../assets/imgs/mastercard.png" 6 | 7 | // export default function Brand({brand}) { 8 | // switch (brand) { 9 | // case 'visa' : return icone visa 10 | // case 'alelo' : return icone alelo 11 | // case 'elo' : return icone elo 12 | // case 'mastercard' : return icone mastercard 13 | // default : return

Selecione um disponivel

14 | // } 15 | // } 16 | 17 | import './style.css' 18 | import Visa from "../../assets/imgs/visa.png" 19 | import Alelo from "../../assets/imgs/alelo.png" 20 | import Elo from "../../assets/imgs/elo.png" 21 | import MasterCard from "../../assets/imgs/mastercard.png" 22 | 23 | const brandImage = { 24 | visa : Visa, 25 | master : MasterCard, 26 | alelo : Alelo, 27 | elo : Elo 28 | } 29 | 30 | export default function Brand({brand}) { 31 | const ImageSrc = brandImage[brand] 32 | return ImageSrc ? {`imagem :

Selecione um bandeira disponivel

33 | } -------------------------------------------------------------------------------- /src/class/hooks/useHooks/pokemonApi/index.jsx: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from "react" 2 | 3 | export default function PokemonApi() { 4 | const [pokemons, setPokemons] = useState([]) 5 | const [loading, setLoading] = useState(true) 6 | const [error, setError] = useState(null) 7 | 8 | useEffect(() => { 9 | fetch('https://pokeapi.co/api/v2/pokemon?limit=10') 10 | .then((res) => res.json()) 11 | .then((data) => { 12 | setPokemons(data.results) 13 | setLoading(false) 14 | }) 15 | .catch((error) => { 16 | setError(error.message) 17 | setLoading(false) 18 | }) 19 | }, []) 20 | 21 | if (loading) { 22 | return

Carregando...

23 | } 24 | 25 | if (error) { 26 | return

Error: {error}

27 | } 28 | 29 | return ( 30 |
31 |

Lista de Pokemons

32 |
    33 | { 34 | pokemons.map((pokemon, i) => 35 |
    36 |
  • {pokemon.name}
  • 37 |
  • {pokemon.url}
  • 38 |
    39 | 40 | ) 41 | } 42 |
43 |
44 | ) 45 | } -------------------------------------------------------------------------------- /src/class/hooks/useHooks/postApi/index.jsx: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from "react" 2 | 3 | export default function PokemonApi() { 4 | const [pokemons, setPokemons] = useState([]) 5 | const [loading, setLoading] = useState(true) 6 | const [error, setError] = useState(null) 7 | 8 | useEffect(() => { 9 | fetch('https://jsonplaceholder.typicode.com/posts') 10 | .then((res) => res.json()) 11 | .then((data) => { 12 | setPokemons(data.results) 13 | setLoading(false) 14 | }) 15 | .catch((error) => { 16 | setError(error.message) 17 | setLoading(false) 18 | }) 19 | }, []) 20 | 21 | if (loading) { 22 | return

Carregando...

23 | } 24 | 25 | if (error) { 26 | return

Error: {error}

27 | } 28 | 29 | return ( 30 |
31 |

Lista de Pokemons

32 |
    33 | { 34 | pokemons.map((pokemon, i) => 35 |
    36 |
  • {pokemon.name}
  • 37 |
  • {pokemon.url}
  • 38 |
    39 | 40 | ) 41 | } 42 |
43 |
44 | ) 45 | } -------------------------------------------------------------------------------- /src/assets/imgs/Logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `npm start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser. 13 | 14 | The page will reload when you make changes.\ 15 | You may also see any lint errors in the console. 16 | 17 | ### `npm test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `npm run build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `npm run eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can't go back!** 35 | 36 | If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. 39 | 40 | You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `npm run build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | -------------------------------------------------------------------------------- /src/fundamentos/exercises.js: -------------------------------------------------------------------------------- 1 | function validaIdade(idade) { 2 | idade >= 18 ? console.log("Pode comprar") : console.log("Não pode comprar") 3 | } 4 | 5 | validaIdade(18) 6 | 7 | console.log(validaIdade) 8 | 9 | const age = 16 10 | const message = age >= 18 ? "Você é maior de idade" : "Você é menor de idade" 11 | 12 | console.log(message) 13 | 14 | function validaParidade(numero) { 15 | return ( 16 | numero % 2 === 0 ? console.log('Par') : console.log('Não é par') 17 | ) 18 | } 19 | 20 | validaParidade(3) 21 | 22 | console.log(validaParidade) 23 | 24 | function validaFidelidade(clienteFidelidade) { 25 | return ( 26 | clienteFidelidade === true ? console.log('Desconto de 10%') : console.log('Cliente novo apenas 5%') 27 | ) 28 | } 29 | 30 | validaFidelidade(true) 31 | 32 | console.log(validaFidelidade) 33 | 34 | function validaIdadeIf(idade) { 35 | if (idade >= 18) { 36 | return console.log("É maior de idade") 37 | } else { 38 | return console.log("É menor de idade") 39 | } 40 | } 41 | 42 | validaIdadeIf(14) 43 | 44 | console.log(validaIdadeIf) 45 | 46 | function validaNota(nota) { 47 | if (nota >= 7) { 48 | return console.log("Aprovado") 49 | } else if (nota >= 5 && nota <= 6) { 50 | return console.log("Está de recuperação") 51 | } else { 52 | return console.log("Reprovado") 53 | } 54 | } 55 | 56 | validaNota(5) 57 | 58 | console.log(validaNota) 59 | 60 | function validaNotas(nota) { 61 | if (nota >= 60) { 62 | return console.log("Aprovado") 63 | } else { 64 | return console.log("Reprovado") 65 | } 66 | } 67 | 68 | validaNotas(60) 69 | 70 | console.log(validaNotas) 71 | 72 | function valideNumero(numero) { 73 | if (numero > 0) { 74 | return console.log("Positivo") 75 | } else if (numero < 0) { 76 | return console.log("Negativo") 77 | } else { 78 | return console.log("Zero") 79 | } 80 | } 81 | 82 | valideNumero(1) 83 | 84 | console.log(valideNumero) 85 | 86 | function diaDaSemana(dia) { 87 | switch (dia) { 88 | case 1 : return console.log("Domingo") 89 | case 2 : return console.log("Segunda") 90 | case 3 : return console.log("Terça") 91 | case 4 : return console.log("Quarta") 92 | case 5 : return console.log("Quinta") 93 | case 6 : return console.log("Sexta") 94 | case 7 : return console.log("Sábado") 95 | default: return console.log("Dia inválido") 96 | } 97 | } 98 | 99 | diaDaSemana(0) 100 | 101 | function handleMonth(meses) { 102 | switch (meses) { 103 | case 1 : return console.log("Janeiro") 104 | case 2 : return console.log("Fereveiro") 105 | case 3 : return console.log("Março") 106 | case 4 : return console.log("Abril") 107 | case 5 : return console.log("Maio") 108 | case 6 : return console.log("Junho") 109 | case 7 : return console.log("Julho") 110 | case 8 : return console.log("Agosto") 111 | case 9 : return console.log("Setembro") 112 | case 10 : return console.log("Outubro") 113 | case 11 : return console.log("Novembro") 114 | case 12 : return console.log("Dezembro") 115 | default : return console.log("Mês errado") 116 | } 117 | } 118 | 119 | handleMonth(8) 120 | 121 | function handleDev(cargo) { 122 | switch (cargo) { 123 | case 'iniciante' : return console.log('Vai estudar') 124 | case 'intermediario' : return console.log('Vai estudar o foco das vagas!') 125 | case 'avancado' : return console.log('Vai aprimorar o conhecimento!') 126 | default: return console.log('Cargo inexistente') 127 | } 128 | } 129 | 130 | handleDev('a') -------------------------------------------------------------------------------- /src/assets/imgs/Placeholder Image.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | --------------------------------------------------------------------------------