From 464b6ecef7c1ecb76236c142ec73bda4348423f0 Mon Sep 17 00:00:00 2001 From: Diegodossantos23 Date: Sun, 29 Nov 2020 21:46:16 -0300 Subject: [PATCH 1/2] ok --- pokedex/.eslintcache | 2 +- pokedex/src/components/PokeCard/PokeCard.js | 101 +++++++++++++------- 2 files changed, 67 insertions(+), 36 deletions(-) diff --git a/pokedex/.eslintcache b/pokedex/.eslintcache index aac71ba..8a1830a 100644 --- a/pokedex/.eslintcache +++ b/pokedex/.eslintcache @@ -1 +1 @@ -[{"/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/reportWebVitals.js":"1","/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/Global/GlobalStateContext.js":"2","/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/screens/HomePage/index.js":"3","/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/assets/img/PokeLogo.js":"4","/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/components/DetailsCard/index.js":"5","/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/Global/GlobalState.js.js":"6","/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/router/Router.js":"7","/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/constants/urls/index.js":"8","/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/router/Coordinator.js":"9","/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/components/PokeCard/PokeCard.js":"10","/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/screens/PokeDexPage/index.js":"11","/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/styles/styles.js":"12","/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/App.js":"13","/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/screens/DetailsPage/index.js":"14"},{"size":362,"mtime":1606440818921,"results":"15","hashOfConfig":"16"},{"size":113,"mtime":1606477072422,"results":"17","hashOfConfig":"16"},{"size":2019,"mtime":1606480293434,"results":"18","hashOfConfig":"16"},{"size":128,"mtime":1606477072422,"results":"19","hashOfConfig":"16"},{"size":2445,"mtime":1606484787498,"results":"20","hashOfConfig":"16"},{"size":854,"mtime":1606477072422,"results":"21","hashOfConfig":"16"},{"size":684,"mtime":1606481348685,"results":"22","hashOfConfig":"16"},{"size":59,"mtime":1606477072426,"results":"23","hashOfConfig":"16"},{"size":310,"mtime":1606481364273,"results":"24","hashOfConfig":"16"},{"size":1269,"mtime":1606480788508,"results":"25","hashOfConfig":"16"},{"size":819,"mtime":1606477072426,"results":"26","hashOfConfig":"16"},{"size":3429,"mtime":1606477072426,"results":"27","hashOfConfig":"16"},{"size":277,"mtime":1606477072422,"results":"28","hashOfConfig":"16"},{"size":1407,"mtime":1606481552824,"results":"29","hashOfConfig":"16"},{"filePath":"30","messages":"31","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},"6ny1o2",{"filePath":"33","messages":"34","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"35","messages":"36","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"37","messages":"38","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"39"},{"filePath":"40","messages":"41","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"44"},{"filePath":"45","messages":"46","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"47"},{"filePath":"48","messages":"49","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"47"},{"filePath":"50","messages":"51","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"44"},{"filePath":"52","messages":"53","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"54","usedDeprecatedRules":"47"},{"filePath":"55","messages":"56","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"57","usedDeprecatedRules":"44"},{"filePath":"58","messages":"59","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"60","messages":"61","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"47"},{"filePath":"62","messages":"63","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},"/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/reportWebVitals.js",[],["64","65"],"/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/Global/GlobalStateContext.js",[],"/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/screens/HomePage/index.js",["66","67"],"/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/assets/img/PokeLogo.js",[],["68","69"],"/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/components/DetailsCard/index.js",["70"],"/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/Global/GlobalState.js.js",[],["71","72"],"/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/router/Router.js",[],["73","74"],"/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/constants/urls/index.js",[],"/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/router/Coordinator.js",[],"/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/components/PokeCard/PokeCard.js",["75"],"import React, { useEffect, useState } from 'react'\nimport { DetailsBtnContainer,PokeCardContainer} from '../../styles/styles'\nimport {Button} from '@material-ui/core'\nimport { useHistory } from \"react-router-dom\";\nimport {goToDetailsPage} from '../../router/Coordinator'\nimport axios from 'axios'\n\nexport default function PokeCard (props) {\n const history = useHistory();\n\n const [photo, setPhoto] = useState ([])\n\n const pokemonPhoto = () => {\n axios.get(props.pokemon.url).then((response) => {\n setPhoto(response.data.sprites.front_default)\n }).catch((error) => {\n console.log(error.message)\n })\n }\n\n useEffect(() => {\n pokemonPhoto()\n }, [])\n\n return(\n
\n \n {props.pokemon.name}/\n

{props.pokemon.name}

\n \n \n \n\n \n \n \n
\n \n )\n} \n","/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/screens/PokeDexPage/index.js",["76"],"import React from 'react'\nimport {Header} from '../../styles/styles'\nimport { useHistory } from \"react-router-dom\";\nimport {Button} from '@material-ui/core'\nimport {ButtonContainer, HomeFlexBox} from '../../styles/styles'\nimport {goToHomePage } from '../../router/Coordinator'\nimport {PokeLogo} from '../../assets/img/PokeLogo'\n\nconst PokeDexPage = () => {\n const history = useHistory();\n\n return(\n
\n
\n \n \n \n\n

PokeDex

\n \n
\n \n \n
\n )\n}\nexport default PokeDexPage;","/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/styles/styles.js",[],"/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/App.js",[],"/home/alvarojr/Labenu/dumont-pokedex7/pokedex/src/screens/DetailsPage/index.js",[],{"ruleId":"77","replacedBy":"78"},{"ruleId":"79","replacedBy":"80"},{"ruleId":"81","severity":1,"message":"82","line":17,"column":8,"nodeType":"83","endLine":17,"endColumn":10,"suggestions":"84"},{"ruleId":"85","severity":1,"message":"86","line":42,"column":19,"nodeType":"87","endLine":42,"endColumn":41},{"ruleId":"77","replacedBy":"88"},{"ruleId":"79","replacedBy":"89"},{"ruleId":"81","severity":1,"message":"90","line":19,"column":6,"nodeType":"83","endLine":19,"endColumn":8,"suggestions":"91"},{"ruleId":"77","replacedBy":"92"},{"ruleId":"79","replacedBy":"93"},{"ruleId":"77","replacedBy":"94"},{"ruleId":"79","replacedBy":"95"},{"ruleId":"81","severity":1,"message":"96","line":23,"column":6,"nodeType":"83","endLine":23,"endColumn":8,"suggestions":"97"},{"ruleId":"85","severity":1,"message":"86","line":23,"column":11,"nodeType":"87","endLine":23,"endColumn":33},"no-native-reassign",["98"],"no-negated-in-lhs",["99"],"react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'requests'. Either include it or remove the dependency array.","ArrayExpression",["100"],"jsx-a11y/alt-text","img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.","JSXOpeningElement",["98"],["99"],"React Hook useEffect has a missing dependency: 'getPokeDetails'. Either include it or remove the dependency array.",["101"],["98"],["99"],["98"],["99"],"React Hook useEffect has a missing dependency: 'pokemonPhoto'. Either include it or remove the dependency array.",["102"],"no-global-assign","no-unsafe-negation",{"desc":"103","fix":"104"},{"desc":"105","fix":"106"},{"desc":"107","fix":"108"},"Update the dependencies array to be: [requests]",{"range":"109","text":"110"},"Update the dependencies array to be: [getPokeDetails]",{"range":"111","text":"112"},"Update the dependencies array to be: [pokemonPhoto]",{"range":"113","text":"114"},[632,634],"[requests]",[592,594],"[getPokeDetails]",[671,673],"[pokemonPhoto]"] \ No newline at end of file +[{"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/screens/HomePage/index.js":"1","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/index.js":"2","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/router/Router.js":"3","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/screens/PokeDexPage/index.js":"4","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/components/DetailsCard/index.js":"5","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/App.js":"6","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/Global/GlobalStateContext.js":"7","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/screens/DetailsPage/index.js":"8","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/components/PokeCard/PokeCard.js":"9","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/Global/GlobalState.js.js":"10"},{"size":1955,"mtime":1606696929509,"results":"11","hashOfConfig":"12"},{"size":500,"mtime":1606451386157,"results":"13","hashOfConfig":"12"},{"size":684,"mtime":1606485742505,"results":"14","hashOfConfig":"12"},{"size":819,"mtime":1606697010973,"results":"15","hashOfConfig":"12"},{"size":2445,"mtime":1606697027543,"results":"16","hashOfConfig":"12"},{"size":277,"mtime":1606671654470,"results":"17","hashOfConfig":"12"},{"size":113,"mtime":1606671654470,"results":"18","hashOfConfig":"12"},{"size":1407,"mtime":1606671654578,"results":"19","hashOfConfig":"12"},{"size":2603,"mtime":1606696880733,"results":"20","hashOfConfig":"12"},{"size":854,"mtime":1606696889749,"results":"21","hashOfConfig":"12"},{"filePath":"22","messages":"23","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"xq4l04",{"filePath":"24","messages":"25","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"28","messages":"29","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"30","messages":"31","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"32","messages":"33","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"38","messages":"39","errorCount":5,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/screens/HomePage/index.js",["42","43"],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/index.js",[],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/router/Router.js",[],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/screens/PokeDexPage/index.js",["44"],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/components/DetailsCard/index.js",["45"],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/App.js",[],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/Global/GlobalStateContext.js",[],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/screens/DetailsPage/index.js",[],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/components/PokeCard/PokeCard.js",["46","47","48","49","50","51","52","53","54"],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/Global/GlobalState.js.js",[],{"ruleId":"55","severity":1,"message":"56","line":17,"column":8,"nodeType":"57","endLine":17,"endColumn":10,"suggestions":"58"},{"ruleId":"59","severity":1,"message":"60","line":40,"column":19,"nodeType":"61","endLine":40,"endColumn":41},{"ruleId":"59","severity":1,"message":"60","line":23,"column":11,"nodeType":"61","endLine":23,"endColumn":33},{"ruleId":"55","severity":1,"message":"62","line":19,"column":6,"nodeType":"57","endLine":19,"endColumn":8,"suggestions":"63"},{"ruleId":"64","severity":1,"message":"65","line":1,"column":29,"nodeType":"66","messageId":"67","endLine":1,"endColumn":38},{"ruleId":"64","severity":1,"message":"68","line":1,"column":40,"nodeType":"66","messageId":"67","endLine":1,"endColumn":48},{"ruleId":"64","severity":1,"message":"69","line":6,"column":8,"nodeType":"66","messageId":"67","endLine":6,"endColumn":13},{"ruleId":"64","severity":1,"message":"70","line":14,"column":22,"nodeType":"66","messageId":"67","endLine":14,"endColumn":32},{"ruleId":"71","severity":2,"message":"72","line":32,"column":7,"nodeType":"66","messageId":"73","endLine":32,"endColumn":18},{"ruleId":"71","severity":2,"message":"72","line":52,"column":7,"nodeType":"66","messageId":"73","endLine":52,"endColumn":18},{"ruleId":"71","severity":2,"message":"74","line":59,"column":22,"nodeType":"66","messageId":"73","endLine":59,"endColumn":27},{"ruleId":"71","severity":2,"message":"75","line":63,"column":36,"nodeType":"66","messageId":"73","endLine":63,"endColumn":45},{"ruleId":"71","severity":2,"message":"75","line":64,"column":22,"nodeType":"66","messageId":"73","endLine":64,"endColumn":31},"react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'requests'. Either include it or remove the dependency array.","ArrayExpression",["76"],"jsx-a11y/alt-text","img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.","JSXOpeningElement","React Hook useEffect has a missing dependency: 'getPokeDetails'. Either include it or remove the dependency array.",["77"],"no-unused-vars","'useEffect' is defined but never used.","Identifier","unusedVar","'useState' is defined but never used.","'axios' is defined but never used.","'setPokemos' is assigned a value but never used.","no-undef","'setPokemons' is not defined.","undef","'photo' is not defined.","'isPokedex' is not defined.",{"desc":"78","fix":"79"},{"desc":"80","fix":"81"},"Update the dependencies array to be: [requests]",{"range":"82","text":"83"},"Update the dependencies array to be: [getPokeDetails]",{"range":"84","text":"85"},[632,634],"[requests]",[592,594],"[getPokeDetails]"] \ No newline at end of file diff --git a/pokedex/src/components/PokeCard/PokeCard.js b/pokedex/src/components/PokeCard/PokeCard.js index 819a3ec..2febeb1 100644 --- a/pokedex/src/components/PokeCard/PokeCard.js +++ b/pokedex/src/components/PokeCard/PokeCard.js @@ -1,47 +1,78 @@ -import React, { useEffect, useState } from 'react' +import React, { useContext, useEffect, useState } from 'react' import { DetailsBtnContainer,PokeCardContainer} from '../../styles/styles' import {Button} from '@material-ui/core' import { useHistory } from "react-router-dom"; import {goToDetailsPage} from '../../router/Coordinator' import axios from 'axios' +import GlobalStateContext from '../../Global/GlobalStateContext' -export default function PokeCard (props) { - const history = useHistory(); + const PokeCard = (props,isPokemon) => { + const history = useHistory(); - const [photo, setPhoto] = useState ([]) + //const [photo, setPhoto] = useState ([]) - const pokemonPhoto = () => { - axios.get(props.pokemon.url).then((response) => { - setPhoto(response.data.sprites.front_default) - }).catch((error) => { - console.log(error.message) - }) - } + const {pokemons, setPokemos, pokedex, setPokedex} = useContext(GlobalStateContext) + + const addToPokedex = () => { + const pokeIndex = pokemons.findIndex( + (item) => item.name === props.pokemon.name + ); + const newPokemonsList = [...pokemons]; + newPokemonsList.splice(pokeIndex, 1); + const orderedPokemons = newPokemonsList.sort((a, b) => { + return a.id - b.id; + }); - useEffect(() => { - pokemonPhoto() - }, []) + const newPokedexList = [...pokedex, props.pokemon]; + const orderedPokedex = newPokedexList.sort((a, b) => { + return a.id - b.id; + }); + + setPokedex(orderedPokedex); + setPokemons(orderedPokemons); + }; + + const removeFromPokedex = () => { + const pokeIndex = pokedex.findIndex( + (item) => item.name === props.pokemon.name + ); + + const newPokedexList = [...pokedex]; + newPokedexList.splice(pokeIndex, 1); + const orderedPokedex = newPokedexList.sort((a, b) => { + return a.id - b.id; + }); + + const newPokemonsList = [...pokemons, props.pokemon]; + const orderedPokemons = newPokemonsList.sort((a, b) => { + return a.id - b.id; + }); + + setPokedex(orderedPokedex); + setPokemons(orderedPokemons); + }; - return( -
- - {props.pokemon.name}/ -

{props.pokemon.name}

- - - + return( + + + {props.pokemon.name}/ +

{props.pokemon.name}

+ + + - - - -
- - ) + + + +
+ + ) } +export default PokeCard; \ No newline at end of file From b73995db01245a7a440c43c5b815bb6ff5fd6c22 Mon Sep 17 00:00:00 2001 From: Diegodossantos23 Date: Sun, 29 Nov 2020 23:51:50 -0300 Subject: [PATCH 2/2] Ajustes finais de responsividade --- README.md | 11 +- pokedex/.eslintcache | 2 +- pokedex/package-lock.json | 18 +-- pokedex/public/index.html | 9 +- pokedex/public/logo-pokebola.jpg | Bin 0 -> 15406 bytes pokedex/src/App.js | 8 +- pokedex/src/Global/GlobalState.js.js | 31 ----- pokedex/src/components/DetailsCard/index.js | 113 ++++++++++-------- pokedex/src/components/PokeCard/PokeCard.js | 85 ++++++------- pokedex/src/constants/urls/index.js | 1 + pokedex/src/global/GlobalState.js.js | 39 ++++++ .../{Global => global}/GlobalStateContext.js | 0 pokedex/src/{Hooks => hooks}/index.js | 11 +- pokedex/src/screens/DetailsPage/index.js | 33 ++--- pokedex/src/screens/HomePage/index.js | 65 ++++------ pokedex/src/screens/PokeDexPage/index.js | 44 ++++--- pokedex/src/styles/styles.js | 86 +++++++++---- 17 files changed, 310 insertions(+), 246 deletions(-) create mode 100644 pokedex/public/logo-pokebola.jpg delete mode 100644 pokedex/src/Global/GlobalState.js.js create mode 100644 pokedex/src/global/GlobalState.js.js rename pokedex/src/{Global => global}/GlobalStateContext.js (100%) rename pokedex/src/{Hooks => hooks}/index.js (78%) diff --git a/README.md b/README.md index c8c0435..99c93bc 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,10 @@ Nome dos integrantes: Link do Surge: www.link.com.br O que funciona: -- As rotas funcionam -- Item 2 - +- Funciona os routers das páginas, sendo possível navegar entre elas. +- É possível ver os detalhes de um pokemon +- A lista dos 20 primeiros pokemons estão sendo renderizadas na página home +- A lista dos pokemons na pokedex estão sendo renderizadas na página pokedex +- O conteudo se adapta a qualqer tamanho de tela O que não funciona: -- O botao adicionar não funciona -- O botao remover não funciona + diff --git a/pokedex/.eslintcache b/pokedex/.eslintcache index 8a1830a..f95b9b2 100644 --- a/pokedex/.eslintcache +++ b/pokedex/.eslintcache @@ -1 +1 @@ -[{"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/screens/HomePage/index.js":"1","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/index.js":"2","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/router/Router.js":"3","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/screens/PokeDexPage/index.js":"4","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/components/DetailsCard/index.js":"5","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/App.js":"6","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/Global/GlobalStateContext.js":"7","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/screens/DetailsPage/index.js":"8","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/components/PokeCard/PokeCard.js":"9","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/Global/GlobalState.js.js":"10"},{"size":1955,"mtime":1606696929509,"results":"11","hashOfConfig":"12"},{"size":500,"mtime":1606451386157,"results":"13","hashOfConfig":"12"},{"size":684,"mtime":1606485742505,"results":"14","hashOfConfig":"12"},{"size":819,"mtime":1606697010973,"results":"15","hashOfConfig":"12"},{"size":2445,"mtime":1606697027543,"results":"16","hashOfConfig":"12"},{"size":277,"mtime":1606671654470,"results":"17","hashOfConfig":"12"},{"size":113,"mtime":1606671654470,"results":"18","hashOfConfig":"12"},{"size":1407,"mtime":1606671654578,"results":"19","hashOfConfig":"12"},{"size":2603,"mtime":1606696880733,"results":"20","hashOfConfig":"12"},{"size":854,"mtime":1606696889749,"results":"21","hashOfConfig":"12"},{"filePath":"22","messages":"23","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"xq4l04",{"filePath":"24","messages":"25","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"28","messages":"29","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"30","messages":"31","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"32","messages":"33","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"38","messages":"39","errorCount":5,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/screens/HomePage/index.js",["42","43"],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/index.js",[],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/router/Router.js",[],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/screens/PokeDexPage/index.js",["44"],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/components/DetailsCard/index.js",["45"],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/App.js",[],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/Global/GlobalStateContext.js",[],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/screens/DetailsPage/index.js",[],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/components/PokeCard/PokeCard.js",["46","47","48","49","50","51","52","53","54"],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/Global/GlobalState.js.js",[],{"ruleId":"55","severity":1,"message":"56","line":17,"column":8,"nodeType":"57","endLine":17,"endColumn":10,"suggestions":"58"},{"ruleId":"59","severity":1,"message":"60","line":40,"column":19,"nodeType":"61","endLine":40,"endColumn":41},{"ruleId":"59","severity":1,"message":"60","line":23,"column":11,"nodeType":"61","endLine":23,"endColumn":33},{"ruleId":"55","severity":1,"message":"62","line":19,"column":6,"nodeType":"57","endLine":19,"endColumn":8,"suggestions":"63"},{"ruleId":"64","severity":1,"message":"65","line":1,"column":29,"nodeType":"66","messageId":"67","endLine":1,"endColumn":38},{"ruleId":"64","severity":1,"message":"68","line":1,"column":40,"nodeType":"66","messageId":"67","endLine":1,"endColumn":48},{"ruleId":"64","severity":1,"message":"69","line":6,"column":8,"nodeType":"66","messageId":"67","endLine":6,"endColumn":13},{"ruleId":"64","severity":1,"message":"70","line":14,"column":22,"nodeType":"66","messageId":"67","endLine":14,"endColumn":32},{"ruleId":"71","severity":2,"message":"72","line":32,"column":7,"nodeType":"66","messageId":"73","endLine":32,"endColumn":18},{"ruleId":"71","severity":2,"message":"72","line":52,"column":7,"nodeType":"66","messageId":"73","endLine":52,"endColumn":18},{"ruleId":"71","severity":2,"message":"74","line":59,"column":22,"nodeType":"66","messageId":"73","endLine":59,"endColumn":27},{"ruleId":"71","severity":2,"message":"75","line":63,"column":36,"nodeType":"66","messageId":"73","endLine":63,"endColumn":45},{"ruleId":"71","severity":2,"message":"75","line":64,"column":22,"nodeType":"66","messageId":"73","endLine":64,"endColumn":31},"react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'requests'. Either include it or remove the dependency array.","ArrayExpression",["76"],"jsx-a11y/alt-text","img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.","JSXOpeningElement","React Hook useEffect has a missing dependency: 'getPokeDetails'. Either include it or remove the dependency array.",["77"],"no-unused-vars","'useEffect' is defined but never used.","Identifier","unusedVar","'useState' is defined but never used.","'axios' is defined but never used.","'setPokemos' is assigned a value but never used.","no-undef","'setPokemons' is not defined.","undef","'photo' is not defined.","'isPokedex' is not defined.",{"desc":"78","fix":"79"},{"desc":"80","fix":"81"},"Update the dependencies array to be: [requests]",{"range":"82","text":"83"},"Update the dependencies array to be: [getPokeDetails]",{"range":"84","text":"85"},[632,634],"[requests]",[592,594],"[getPokeDetails]"] \ No newline at end of file +[{"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/reportWebVitals.js":"1","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/global/GlobalStateContext.js":"2","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/constants/urls/index.js":"3","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/screens/PokeDexPage/index.js":"4","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/router/Coordinator.js":"5","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/assets/img/PokeLogo.js":"6","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/components/PokeCard/PokeCard.js":"7","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/screens/DetailsPage/index.js":"8","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/styles/styles.js":"9","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/components/DetailsCard/index.js":"10","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/index.js":"11","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/screens/HomePage/index.js":"12"},{"size":362,"mtime":1606451386157,"results":"13","hashOfConfig":"14"},{"size":113,"mtime":1606697181858,"results":"15","hashOfConfig":"14"},{"size":115,"mtime":1606704166531,"results":"16","hashOfConfig":"14"},{"size":1385,"mtime":1606703644491,"results":"17","hashOfConfig":"14"},{"size":310,"mtime":1606485742505,"results":"18","hashOfConfig":"14"},{"size":128,"mtime":1606485742477,"results":"19","hashOfConfig":"14"},{"size":2842,"mtime":1606697507033,"results":"20","hashOfConfig":"14"},{"size":1169,"mtime":1606697933837,"results":"21","hashOfConfig":"14"},{"size":4129,"mtime":1606704674429,"results":"22","hashOfConfig":"14"},{"size":3147,"mtime":1606704161639,"results":"23","hashOfConfig":"14"},{"size":500,"mtime":1606451386157,"results":"24","hashOfConfig":"14"},{"size":1667,"mtime":1606703610124,"results":"25","hashOfConfig":"14"},{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"xq4l04",{"filePath":"28","messages":"29","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"30","messages":"31","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"32","messages":"33","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"38"},{"filePath":"39","messages":"40","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"41","messages":"42","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"43"},{"filePath":"44","messages":"45","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"46","messages":"47","errorCount":0,"warningCount":6,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"48","messages":"49","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"50","messages":"51","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/reportWebVitals.js",[],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/global/GlobalStateContext.js",[],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/constants/urls/index.js",[],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/screens/PokeDexPage/index.js",["52","53","54"],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/router/Coordinator.js",[],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/assets/img/PokeLogo.js",[],["55","56"],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/components/PokeCard/PokeCard.js",["57","58"],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/screens/DetailsPage/index.js",["59","60","61","62"],"import React from 'react'\nimport {Header, BtnContainer,ButtonContainer, DetailsBtnContainer} from '../../styles/styles'\nimport DetailsCard from '../../components/DetailsCard/index'\nimport { useHistory, useParams } from \"react-router-dom\";\nimport {goBack} from '../../router/Coordinator'\nimport {Button} from '@material-ui/core'\nimport {PokeLogo} from '../../assets/img/PokeLogo'\n\nconst DetailsPage = () => {\n const history = useHistory();\n const pathParams = useParams();\n\n return(\n \n < Header role=\"header\">\n {/** Botao para voltar pra homepage*/}\n \n \n \n

Detalhes do pokemon

\n\n \n \n \n \n \n \n
\n )\n}\nexport default DetailsPage;","/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/styles/styles.js",[],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/components/DetailsCard/index.js",["63","64","65","66","67","68"],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/index.js",[],"/home/diego/Documents/Labenu/Week-Projects/Diego-Rosa/semana11/dumont-pokedex7/pokedex/src/screens/HomePage/index.js",["69","70","71","72"],{"ruleId":"73","severity":1,"message":"74","line":27,"column":19,"nodeType":"75","endLine":27,"endColumn":28},{"ruleId":"76","severity":1,"message":"77","line":28,"column":15,"nodeType":"78","endLine":28,"endColumn":48},{"ruleId":"79","severity":1,"message":"80","line":28,"column":15,"nodeType":"78","endLine":28,"endColumn":48},{"ruleId":"81","replacedBy":"82"},{"ruleId":"83","replacedBy":"84"},{"ruleId":"85","severity":1,"message":"86","line":13,"column":29,"nodeType":"87","messageId":"88","endLine":13,"endColumn":37},{"ruleId":"89","severity":1,"message":"90","line":25,"column":8,"nodeType":"91","endLine":25,"endColumn":10,"suggestions":"92"},{"ruleId":"85","severity":1,"message":"93","line":2,"column":17,"nodeType":"87","messageId":"88","endLine":2,"endColumn":29},{"ruleId":"85","severity":1,"message":"94","line":2,"column":47,"nodeType":"87","messageId":"88","endLine":2,"endColumn":66},{"ruleId":"76","severity":1,"message":"77","line":26,"column":15,"nodeType":"78","endLine":26,"endColumn":48},{"ruleId":"79","severity":1,"message":"80","line":26,"column":15,"nodeType":"78","endLine":26,"endColumn":48},{"ruleId":"89","severity":1,"message":"95","line":21,"column":6,"nodeType":"91","endLine":21,"endColumn":8,"suggestions":"96"},{"ruleId":"89","severity":1,"message":"97","line":35,"column":6,"nodeType":"91","endLine":35,"endColumn":12,"suggestions":"98"},{"ruleId":"73","severity":1,"message":"74","line":58,"column":31,"nodeType":"75","endLine":58,"endColumn":40},{"ruleId":"73","severity":1,"message":"74","line":66,"column":29,"nodeType":"75","endLine":66,"endColumn":38},{"ruleId":"73","severity":1,"message":"74","line":74,"column":31,"nodeType":"75","endLine":74,"endColumn":40},{"ruleId":"73","severity":1,"message":"74","line":77,"column":43,"nodeType":"75","endLine":77,"endColumn":51},{"ruleId":"85","severity":1,"message":"99","line":1,"column":29,"nodeType":"87","messageId":"88","endLine":1,"endColumn":38},{"ruleId":"73","severity":1,"message":"74","line":24,"column":31,"nodeType":"75","endLine":24,"endColumn":40},{"ruleId":"76","severity":1,"message":"77","line":25,"column":27,"nodeType":"78","endLine":25,"endColumn":60},{"ruleId":"79","severity":1,"message":"80","line":25,"column":27,"nodeType":"78","endLine":25,"endColumn":60},"jsx-a11y/aria-role","Elements with ARIA roles must use a valid, non-abstract ARIA role.","JSXAttribute","jsx-a11y/alt-text","img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.","JSXOpeningElement","jsx-a11y/no-redundant-roles","The element img has an implicit role of img. Defining this explicitly is redundant and should be avoided.","no-native-reassign",["100"],"no-negated-in-lhs",["101"],"no-unused-vars","'requests' is assigned a value but never used.","Identifier","unusedVar","react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'pokemonPhoto'. Either include it or remove the dependency array.","ArrayExpression",["102"],"'BtnContainer' is defined but never used.","'DetailsBtnContainer' is defined but never used.","React Hook useEffect has a missing dependency: 'getPokeDetails'. Either include it or remove the dependency array.",["103"],"React Hook useEffect has a missing dependency: 'renderMoves'. Either include it or remove the dependency array.",["104"],"'useEffect' is defined but never used.","no-global-assign","no-unsafe-negation",{"desc":"105","fix":"106"},{"desc":"107","fix":"108"},{"desc":"109","fix":"110"},"Update the dependencies array to be: [pokemonPhoto]",{"range":"111","text":"112"},"Update the dependencies array to be: [getPokeDetails]",{"range":"113","text":"114"},"Update the dependencies array to be: [data, renderMoves]",{"range":"115","text":"116"},[832,834],"[pokemonPhoto]",[638,640],"[getPokeDetails]",[913,919],"[data, renderMoves]"] \ No newline at end of file diff --git a/pokedex/package-lock.json b/pokedex/package-lock.json index b6dc1e9..f0b0438 100644 --- a/pokedex/package-lock.json +++ b/pokedex/package-lock.json @@ -5234,9 +5234,9 @@ "integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==" }, "electron-to-chromium": { - "version": "1.3.609", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.609.tgz", - "integrity": "sha512-kcmRWmlHsUKKLfsSKSf7VqeTX4takM5ndjVTM3et3qpDCceITYI1DixvIfSDIngALoaTnpoMXD3SXSMpzHkYKA==" + "version": "1.3.610", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.610.tgz", + "integrity": "sha512-eFDC+yVQpEhtlapk4CYDPfV9ajF9cEof5TBcO49L1ETO+aYogrKWDmYpZyxBScMNe8Bo/gJamH4amQ4yyvXg4g==" }, "elliptic": { "version": "6.5.3", @@ -13741,9 +13741,9 @@ } }, "spdx-license-ids": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.6.tgz", - "integrity": "sha512-+orQK83kyMva3WyPf59k1+Y525csj5JejicWut55zeTWANuN17qSiSLUXWtzHeNWORSvT7GLDJ/E/XiIWoXBTw==" + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz", + "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==" }, "spdy": { "version": "4.0.2", @@ -14490,9 +14490,9 @@ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" }, "terser": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.5.0.tgz", - "integrity": "sha512-eopt1Gf7/AQyPhpygdKePTzaet31TvQxXvrf7xYUvD/d8qkCJm4SKPDzu+GHK5ZaYTn8rvttfqaZc3swK21e5g==", + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.5.1.tgz", + "integrity": "sha512-6VGWZNVP2KTUcltUQJ25TtNjx/XgdDsBDKGt8nN0MpydU36LmbPPcMBd2kmtZNNGVVDLg44k7GKeHHj+4zPIBQ==", "requires": { "commander": "^2.20.0", "source-map": "~0.7.2", diff --git a/pokedex/public/index.html b/pokedex/public/index.html index aa069f2..6f358ce 100644 --- a/pokedex/public/index.html +++ b/pokedex/public/index.html @@ -2,13 +2,18 @@ - + + + + + + - React App + PokeDex diff --git a/pokedex/public/logo-pokebola.jpg b/pokedex/public/logo-pokebola.jpg new file mode 100644 index 0000000000000000000000000000000000000000..312e26cef8932cbe8ceb65e5ef43d5008206afe6 GIT binary patch literal 15406 zcmeHOcUV-{w#VeYa^HLRz1-a7OFl)IJ}`wgzzj_Ur7BgrqA0QV5=GQlNQ@X0m0&|f z5fw`;i9N=si5+9_Mu{a68=`_J1GC;*XXXrN&J>8r`|I7|JML5VUhB8kUVH7e_u4u+ zwR3vY>8-b%uoO5A`iqm3zmt=bKwx}!`@54Y^~lAC~kybjXOq=62Y2|Net;@7_IV zYH9)l{xvr@!{f&_aQxT_7&UUtq4ph+hUwR@-+)rKZF%`xxclp`U@%ZC{Nt9U``X%C zn3O+dIW_m!2Kg2hEie#X!diX5+SrEbvTa#9oOkzrt2Ts%MQVl(8(G52dg8=M>$Yqg zwltz*>Xnt1Elo&Bygq$e0i&z>`uY~0SYNN#L)pqQ7&de$j2k-+jvPJ0d~a@QhI41n zL4IET4PT9>F*z|2GSf0(<|i{@UBx;$c<>;cJ97>e6fb}g!$!c?EnmaBwdSpP7c;jhopo=y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/src/Global/GlobalState.js.js +++ /dev/null @@ -1,31 +0,0 @@ - -import React, { useState } from 'react' -import axios from 'axios' -import GlobalStateContext from './GlobalStateContext' -import {baseURL} from '../constants/urls/index' - -const GlobalState = (props) => { - const [pokemonList, setPokemonList] = useState([]) - const [pokedex, setPokedex] = useState([]) - //pega a lista de pokemons da pokeAPI - const getPokemonList = () =>{ - - axios.get(baseURL).then(response => { - setPokemonList(response.data.results) - }) - .catch(error =>{console.log(error)}) -} -const states = {pokemonList, pokedex} -const setters = {setPokemonList, setPokedex} -const requests = {getPokemonList} - -//dados pra passar para os componentes -const data = {states, setters, requests} - -return ( - - {props.children} - - ) -} -export default GlobalState; \ No newline at end of file diff --git a/pokedex/src/components/DetailsCard/index.js b/pokedex/src/components/DetailsCard/index.js index c905bc1..b04f3f7 100644 --- a/pokedex/src/components/DetailsCard/index.js +++ b/pokedex/src/components/DetailsCard/index.js @@ -5,8 +5,10 @@ import { baseURL } from '../../constants/urls' const DetailsCard = (props) => { const [data, setData] = useState({}) + const [moves, setMoves] = useState([]) const getPokeDetails = () => { + axios.get(`${baseURL}/${props.pokemon.pokemon}`).then((res)=>{ setData(res.data) }).catch((err)=>{ @@ -18,54 +20,71 @@ const DetailsCard = (props) => { getPokeDetails() }, []) - return( -
- + const renderMoves = () => { + const newMoves = [] + if (data.moves) { + for (let i=0; (i < 7 && i < data.moves.length); i++){ + newMoves.push(data.moves[i].move.name) + } + setMoves(newMoves) + } + } + + useEffect(() => { + renderMoves() + }, [data]) + - - - {/*Front img pokemon */} - {data.sprites && } - - - {/*Back img pokemon */} - {data.sprites && } - - - - -

Stats

-
- {data.stats && data.stats.map((stat) => { - return

{stat.stat.name}: {stat.base_stat}

- })} -
-
-
- - -

Type:

- {data.types && data.types.map((type) => { - return

{type.type.name}

- })} -
- -

Moves

- {data.moves &&
-

{data.moves[0].move.name}

-

{data.moves[1].move.name}

-

{data.moves[2].move.name}

-

{data.moves[3].move.name}

-

{data.moves[4].move.name}

-

{data.moves[5].move.name}

-

{data.moves[6].move.name}

-

{data.moves[7].move.name}

-
} -
-
-
-
+ + return( + + + + + {/*Get front img pokemon */} + {data.sprites && } + + + {/*Get back img pokemon */} + {data.sprites && } + + + + +

Type:

+ {data.types && data.types.map((type) => { + return

+ {type.type.name} +

+ })} +
+ +

Moves

+ {moves && moves.map((moves) => { + return

{moves}

+ })} +
+
+ + +

Stats

+ + {data.stats && data.stats.map((stat) => { + return

+ {stat.stat.name}: + {stat.base_stat} +

+ })} +
+
+
+
+
) } - export default DetailsCard; \ No newline at end of file diff --git a/pokedex/src/components/PokeCard/PokeCard.js b/pokedex/src/components/PokeCard/PokeCard.js index 2febeb1..4d962c8 100644 --- a/pokedex/src/components/PokeCard/PokeCard.js +++ b/pokedex/src/components/PokeCard/PokeCard.js @@ -4,53 +4,53 @@ import {Button} from '@material-ui/core' import { useHistory } from "react-router-dom"; import {goToDetailsPage} from '../../router/Coordinator' import axios from 'axios' -import GlobalStateContext from '../../Global/GlobalStateContext' +import GlobalStateContext from '../../global/GlobalStateContext'; - const PokeCard = (props,isPokemon) => { + const PokeCard = (props) => { const history = useHistory(); - //const [photo, setPhoto] = useState ([]) + const [photo, setPhoto] = useState ([]) + const {states, setters, requests} = useContext(GlobalStateContext) + + const pokemonPhoto = () => { + axios.get(props.pokemon.url).then((response) => { + setPhoto(response.data.sprites.front_default) + }).catch((error) => { + console.log(error.message) + }) + } + + useEffect(() => { + pokemonPhoto() + }, []) - const {pokemons, setPokemos, pokedex, setPokedex} = useContext(GlobalStateContext) - const addToPokedex = () => { - const pokeIndex = pokemons.findIndex( - (item) => item.name === props.pokemon.name - ); - const newPokemonsList = [...pokemons]; - newPokemonsList.splice(pokeIndex, 1); - const orderedPokemons = newPokemonsList.sort((a, b) => { - return a.id - b.id; - }); + const pokeIndex = states.pokemonList.findIndex((item) => item.name === props.pokemon.name) + const newPokemonList = [...states.pokemonList] + newPokemonList.splice(pokeIndex, 1) + + const newPokedexList = [...states.pokedex, props.pokemon] + const orderedList = newPokedexList.sort((a, b) => { + return Number(a.url.slice(34,a.url.length-1)) - Number(b.url.slice(34,b.url.length-1)) + }) + + setters.setPokedex(orderedList) + setters.setPokemonList(newPokemonList) + } - const newPokedexList = [...pokedex, props.pokemon]; - const orderedPokedex = newPokedexList.sort((a, b) => { - return a.id - b.id; - }); - - setPokedex(orderedPokedex); - setPokemons(orderedPokemons); - }; - const removeFromPokedex = () => { - const pokeIndex = pokedex.findIndex( - (item) => item.name === props.pokemon.name - ); - - const newPokedexList = [...pokedex]; - newPokedexList.splice(pokeIndex, 1); - const orderedPokedex = newPokedexList.sort((a, b) => { - return a.id - b.id; - }); - - const newPokemonsList = [...pokemons, props.pokemon]; - const orderedPokemons = newPokemonsList.sort((a, b) => { - return a.id - b.id; - }); - - setPokedex(orderedPokedex); - setPokemons(orderedPokemons); - }; + const pokeIndex = states.pokedex.findIndex((item) => item.name === props.pokemon.name) + const newPokedexList = [...states.pokedex] + newPokedexList.splice(pokeIndex, 1) + + const newPokemonList = [...states.pokemonList, props.pokemon] + const orderedList = newPokemonList.sort((a, b) => { + return Number(a.url.slice(34,a.url.length-1)) - Number(b.url.slice(34,b.url.length-1)) + }) + + setters.setPokedex(newPokedexList) + setters.setPokemonList(orderedList) + } return( @@ -60,8 +60,9 @@ import GlobalStateContext from '../../Global/GlobalStateContext' alt={props.pokemon.name}/>

{props.pokemon.name}

- diff --git a/pokedex/src/constants/urls/index.js b/pokedex/src/constants/urls/index.js index 90e90df..b0a621b 100644 --- a/pokedex/src/constants/urls/index.js +++ b/pokedex/src/constants/urls/index.js @@ -1 +1,2 @@ +//URL base da poke api que contem os dados dos pokemons export const baseURL = "https://pokeapi.co/api/v2/pokemon" \ No newline at end of file diff --git a/pokedex/src/global/GlobalState.js.js b/pokedex/src/global/GlobalState.js.js new file mode 100644 index 0000000..f8543bd --- /dev/null +++ b/pokedex/src/global/GlobalState.js.js @@ -0,0 +1,39 @@ +import React, { useEffect, useState } from 'react' +import axios from 'axios' +import GlobalStateContext from '../global/GlobalStateContext' +import {baseURL} from '../constants/urls/index' + +const GlobalState = (props) => { + const [pokemonList, setPokemonList] = useState([]) + + const [pokedex, setPokedex] = useState([]) + + //pega a lista de pokemons da pokeAPI + const getPokemonList = () =>{ + + axios.get(baseURL).then(response => { + setPokemonList(response.data.results) + }) + .catch(error =>{console.log(error)}) + } + + useEffect(()=>{ + getPokemonList() + }, []) + + const states = {pokemonList, pokedex} + const setters = {setPokemonList, setPokedex} + const requests = {getPokemonList} + + //dados pra passar para os componentes + const data = {states, setters, requests} + {/**teste */} + return ( + + {props.children} + + ) +} + +export default GlobalState; \ No newline at end of file diff --git a/pokedex/src/Global/GlobalStateContext.js b/pokedex/src/global/GlobalStateContext.js similarity index 100% rename from pokedex/src/Global/GlobalStateContext.js rename to pokedex/src/global/GlobalStateContext.js diff --git a/pokedex/src/Hooks/index.js b/pokedex/src/hooks/index.js similarity index 78% rename from pokedex/src/Hooks/index.js rename to pokedex/src/hooks/index.js index d473905..cd225d0 100644 --- a/pokedex/src/Hooks/index.js +++ b/pokedex/src/hooks/index.js @@ -1,9 +1,12 @@ -import React, { useEffect, useState } from 'react' +import { useEffect, useState } from 'react' import axios from 'axios' -//teste + const GetHooks = () => { + const [dados,setDados] = useState([]) - const getDados = () =>{ + + const getDados = () =>{ + //Pega os dados dos pokemons na poke API axios.get('https://pokeapi.co/api/v2/pokemon').then(resposta => { setDados(resposta.data.results) console.log(resposta.data.results) @@ -16,7 +19,5 @@ const GetHooks = () => { }, []) return(dados.map) - } - export default GetHooks; \ No newline at end of file diff --git a/pokedex/src/screens/DetailsPage/index.js b/pokedex/src/screens/DetailsPage/index.js index 55c81a9..07ae7cc 100644 --- a/pokedex/src/screens/DetailsPage/index.js +++ b/pokedex/src/screens/DetailsPage/index.js @@ -4,38 +4,31 @@ import DetailsCard from '../../components/DetailsCard/index' import { useHistory, useParams } from "react-router-dom"; import {goBack} from '../../router/Coordinator' import {Button} from '@material-ui/core' +import {PokeLogo} from '../../assets/img/PokeLogo' const DetailsPage = () => { const history = useHistory(); const pathParams = useParams(); return( -
- < Header> + + < Header role="header"> {/** Botao para voltar pra homepage*/} - - -

Nome do Pokemon

+

Detalhes do pokemon

- {/*Botoes add e remover pokemon*/ } - - - - - - - - - + + -
- -
-
+ + + +
) } export default DetailsPage; \ No newline at end of file diff --git a/pokedex/src/screens/HomePage/index.js b/pokedex/src/screens/HomePage/index.js index 187bdf5..467f569 100644 --- a/pokedex/src/screens/HomePage/index.js +++ b/pokedex/src/screens/HomePage/index.js @@ -4,51 +4,38 @@ import { useHistory } from "react-router-dom"; import {goToPokeDexPage} from '../../router/Coordinator' import {Button} from '@material-ui/core' import PokeCard from '../../components/PokeCard/PokeCard'; -import GlobalStateContext from '../../Global/GlobalStateContext'; +import GlobalStateContext from '../../global/GlobalStateContext'; import {PokeLogo} from '../../assets/img/PokeLogo' const HomePage = () => { const history = useHistory(); -const {states, setters, requests} = useContext(GlobalStateContext) - - useEffect(()=>{ - requests.getPokemonList() - }, []) - const addToPokedex = (newPokemon) => { - const pokemonInPokedex = states.pokedex.find((pokemon) => newPokemon.name === pokemon.name) - if (!pokemonInPokedex) { - const pokemonToAdd = states.pokemonList.find((pokemon) => newPokemon.name === pokemon.name) - const newPokedex = [...states.pokedex, pokemonToAdd] - setters.setPokedex(newPokedex) - } - } - // const renderedPokemons = () => { - // pokemonList.map((pokemon) => { - // return () - // }) - // } + const {states} = useContext(GlobalStateContext) + return( -
-
- - - -

Lista de Pokemons

- -
- - - {states.pokemonList && - states.pokemonList.map((pokemon) => { - return ( addToPokedex(pokemon)}/>) - }) - } - - -
+ +
+ + + +

Lista de Pokemons

+ +
+ + {states.pokemonList && + states.pokemonList.map((pokemon) => { + return ( + ) + }) + } + +
) } export default HomePage; diff --git a/pokedex/src/screens/PokeDexPage/index.js b/pokedex/src/screens/PokeDexPage/index.js index a1e1498..db30f86 100644 --- a/pokedex/src/screens/PokeDexPage/index.js +++ b/pokedex/src/screens/PokeDexPage/index.js @@ -1,30 +1,44 @@ -import React from 'react' +import React, { useContext } from 'react' import {Header} from '../../styles/styles' import { useHistory } from "react-router-dom"; import {Button} from '@material-ui/core' import {ButtonContainer, HomeFlexBox} from '../../styles/styles' import {goToHomePage } from '../../router/Coordinator' import {PokeLogo} from '../../assets/img/PokeLogo' +import GlobalStateContext from '../../global/GlobalStateContext'; +import PokeCard from '../../components/PokeCard/PokeCard'; const PokeDexPage = () => { + const history = useHistory(); + const {states} = useContext(GlobalStateContext) + return( -
-
- - - + +
+ + + -

PokeDex

- -
- - -
+

PokeDex

+ + + + {states.pokedex && + states.pokedex.map((pokemon) => { + return ( + ) + }) + } + + ) } export default PokeDexPage; \ No newline at end of file diff --git a/pokedex/src/styles/styles.js b/pokedex/src/styles/styles.js index 25ffd47..944e8f5 100644 --- a/pokedex/src/styles/styles.js +++ b/pokedex/src/styles/styles.js @@ -6,7 +6,7 @@ import styled from 'styled-components' export const Header = styled.header ` background-color:#ff6666; color:#fff; - height: 50px; + height: 80px; padding:20px 20px; display:flex; justify-content:space-between; @@ -22,13 +22,38 @@ export const Header = styled.header ` h1{ color: #ffff33; } + + @media only screen and (max-width: 600px) { + header{ + height:40px; + width:100vw; + + } + + img{ + height:30px; + width:100px + } + + h1{ + font-size:15px; + } + + button{ + height:50px; + width:30px; + font-size:10px; + } + + } + ` //FLEXBOX PARA HOME E DETALHES--- export const HomeFlexBox = styled.main ` height:100vh; display:flex; justify-content:center; - justify-content:space-evenly; + justify-content:space-around; flex-wrap: wrap; padding-top:50px; ` @@ -37,6 +62,7 @@ export const HomeFlexBox = styled.main ` export const PokeCardContainer = styled.div ` background-color: #f2f2f2; display:flex; + border-radius:20px; flex-direction:column; justify-content:space-evenly; justify-content:center; @@ -58,6 +84,8 @@ export const DetailsFlexBox = styled.main ` justify-content:center; flex-wrap: wrap; padding-top: 8%; + + ` //ESTILOS PARA O DETAILS CARD export const ImgFlexBox = styled.div ` @@ -70,6 +98,7 @@ export const ImgFlexBox = styled.div ` ` export const PokeImgContainer = styled.div ` background-color:#f2f2f2f2; + border-radius:20px; height:250px; width:250px; margin: 20px; @@ -79,43 +108,44 @@ export const PokeImgContainer = styled.div ` text-align:center; align-items:center; ` - -export const StatsFlexBox = styled.div ` - display:flex; - justify-content:column; - text-align:Center; -` -export const PokeStatsContainer = styled.div ` - background-color:#f2f2f2f2; - height:543px; - width:300px; - margin: 20px; - box-shadow: 3px 3px 3px 3px #d9d9d9; - display:flex; - flex-direction:column; - justify-content:center; - text-align:center; - align-items:center; -` export const TypeMovesFlexBox = styled.div ` display:flex; flex-direction:column; ` export const PokeTypeContainer = styled.div ` background-color:#f2f2f2f2; + border-radius:20px; height:60px; - width:400px; + width:350px; margin: 20px; box-shadow: 3px 3px 3px 3px #d9d9d9; display:flex; flex-direction:row; justify-content: space-evenly; ` - -export const PokeMovesContainer = styled.div` + export const PokeMovesContainer = styled.div` + background-color:#f2f2f2f2; + border-radius:20px; + height:439px; + width:350px; + margin: 20px; + box-shadow: 3px 3px 3px 3px #d9d9d9; + display:flex; + flex-direction:column; + justify-content:center; + text-align:center; + align-items:center; + ` +export const StatsFlexBox = styled.div ` + display:flex; + justify-content:column; + text-align:Center; +` +export const PokeStatsContainer = styled.div ` background-color:#f2f2f2f2; - height:439px; - width:400px; + border-radius:20px; + height:543px; + width:350px; margin: 20px; box-shadow: 3px 3px 3px 3px #d9d9d9; display:flex; @@ -125,6 +155,8 @@ export const PokeMovesContainer = styled.div` align-items:center; ` + + //BOTOES ------------------------------------- export const BtnContainer = styled.div` display: flex; @@ -150,4 +182,6 @@ export const DetailsBtnContainer = styled.div ` list-style:none; } - ` \ No newline at end of file + ` + + \ No newline at end of file