Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

foi aplicado a limpeza de código geral #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pokedex/.eslintcache
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\reportWebVitals.js":"1","F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\Components\\PokeCard\\PokeCard.js":"2","F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\Components\\PokeCard\\styledPokeCard.js":"3","F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\Components\\global\\GlobalState.js":"4","F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\App.js":"5","F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\Components\\PokeCard\\Pokedex.js":"6","F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\Components\\Home\\Home.js":"7","F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\routes\\Router.js":"8","F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\Components\\Home\\styled.js":"9","F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\Components\\PokeDetalis\\PageDetails.js":"10","F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\Components\\PokeDetalis\\styledDetails.js":"11","F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\Components\\PokeDetalis\\PokeStats.js":"12","F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\Components\\PokeDetalis\\StyledPageDetails.js":"13","F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\Components\\PokeDetalis\\PokeMoves.js":"14","F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\Components\\PokeDetalis\\PokeType.js":"15","F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\Components\\PokeDetalis\\PokeImage.js":"16","F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\hearder\\Header.js":"17"},{"size":362,"mtime":1606155479034,"results":"18","hashOfConfig":"19"},{"size":704,"mtime":1606691851864,"results":"20","hashOfConfig":"19"},{"size":1069,"mtime":1606669613952,"results":"21","hashOfConfig":"19"},{"size":1782,"mtime":1606696992135,"results":"22","hashOfConfig":"19"},{"size":279,"mtime":1606689884346,"results":"23","hashOfConfig":"19"},{"size":1361,"mtime":1606697092661,"results":"24","hashOfConfig":"19"},{"size":1382,"mtime":1606696840501,"results":"25","hashOfConfig":"19"},{"size":1050,"mtime":1606667721161,"results":"26","hashOfConfig":"19"},{"size":159,"mtime":1606496534708,"results":"27","hashOfConfig":"19"},{"size":546,"mtime":1606671596503,"results":"28","hashOfConfig":"19"},{"size":1294,"mtime":1606674800257,"results":"29","hashOfConfig":"19"},{"size":1161,"mtime":1606694271140,"results":"30","hashOfConfig":"19"},{"size":416,"mtime":1606674875880,"results":"31","hashOfConfig":"19"},{"size":572,"mtime":1606697117480,"results":"32","hashOfConfig":"19"},{"size":481,"mtime":1606693891977,"results":"33","hashOfConfig":"19"},{"size":788,"mtime":1606696769558,"results":"34","hashOfConfig":"19"},{"size":1302,"mtime":1606696729905,"results":"35","hashOfConfig":"19"},{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1ivzh0c",{"filePath":"38","messages":"39","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"44","messages":"45","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"46","messages":"47","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"48","messages":"49","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"50","messages":"51","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"52","usedDeprecatedRules":"53"},{"filePath":"54","messages":"55","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"56","messages":"57","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"58","messages":"59","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"60","messages":"61","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"62","messages":"63","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"64","messages":"65","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"66","messages":"67","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"68","messages":"69","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"70","messages":"71","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\reportWebVitals.js",[],"F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\Components\\PokeCard\\PokeCard.js",[],"F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\Components\\PokeCard\\styledPokeCard.js",[],"F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\Components\\global\\GlobalState.js",[],"F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\App.js",[],"F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\Components\\PokeCard\\Pokedex.js",["72","73"],"F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\Components\\Home\\Home.js",["74"],"F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\routes\\Router.js",["75"],"import React, {useState} from 'react';\nimport {BrowserRouter, Switch, Route} from 'react-router-dom';\nimport Home from '../Components/Home/Home';\nimport Pokedex from '../Components/PokeCard/Pokedex';\nimport PageDetails from '../Components/PokeDetalis/PageDetails';\nimport Header from '../hearder/Header';\n\n\nconst Router = () => {\n //const [bla, setBla] = useState([]) aqui deve vir um estado\n\n return (\n <BrowserRouter>\n <Switch>\n {/* página home */}\n <Route exact path={'/'}>\n <Header/>\n <Home />\n </Route>\n {/* página pokedex */}\n <Route exact path={'/pokedex'}>\n <Header/>\n <Pokedex/>\n </Route>\n {/* página detalhes */}\n <Route exact path={'/detalhes'}>\n <Header/>\n <PageDetails/>\n </Route>\n\n </Switch>\n </BrowserRouter>\n )\n}\n\nexport default Router",["76","77"],"F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\Components\\Home\\styled.js",[],"F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\Components\\PokeDetalis\\PageDetails.js",["78"],"F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\Components\\PokeDetalis\\styledDetails.js",[],"F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\Components\\PokeDetalis\\PokeStats.js",[],"F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\Components\\PokeDetalis\\StyledPageDetails.js",[],"F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\Components\\PokeDetalis\\PokeMoves.js",[],"F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\Components\\PokeDetalis\\PokeType.js",[],"F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\Components\\PokeDetalis\\PokeImage.js",[],"F:\\LABENU\\Trabalho em grupoo\\dumont\\dumont-pokedex10\\pokedex\\src\\hearder\\Header.js",[],{"ruleId":"79","severity":1,"message":"80","line":1,"column":16,"nodeType":"81","messageId":"82","endLine":1,"endColumn":24},{"ruleId":"79","severity":1,"message":"83","line":1,"column":38,"nodeType":"81","messageId":"82","endLine":1,"endColumn":47},{"ruleId":"79","severity":1,"message":"80","line":1,"column":29,"nodeType":"81","messageId":"82","endLine":1,"endColumn":37},{"ruleId":"79","severity":1,"message":"80","line":1,"column":16,"nodeType":"81","messageId":"82","endLine":1,"endColumn":24},{"ruleId":"84","replacedBy":"85"},{"ruleId":"86","replacedBy":"87"},{"ruleId":"79","severity":1,"message":"88","line":1,"column":8,"nodeType":"81","messageId":"82","endLine":1,"endColumn":17},"no-unused-vars","'useState' is defined but never used.","Identifier","unusedVar","'useEffect' is defined but never used.","no-native-reassign",["89"],"no-negated-in-lhs",["90"],"'PokeImage' is defined but never used.","no-global-assign","no-unsafe-negation"]
[{"F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\routes\\Router.js":"1","F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\Coordination\\coordination.js":"2","F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\reportWebVitals.js":"3","F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\Components\\PokeCard\\PokeCard.js":"4","F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\App.js":"5","F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\Components\\PokeDetalis\\PokeImage.js":"6","F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\Components\\PokeDetalis\\PokeMoves.js":"7","F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\Components\\PokeDetalis\\PokeStats.js":"8","F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\Components\\PokeDetalis\\styledDetails.js":"9","F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\Components\\PokeDetalis\\PokeType.js":"10","F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\Pages\\DetailsPage\\StyledDetailsPage.js":"11","F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\Pages\\PokedexPage\\PokedexPage.js":"12","F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\global\\GlobalState.js":"13","F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\Components\\Header\\Header.js":"14","F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\Pages\\HomePage\\HomePage.js":"15","F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\Pages\\HomePage\\styledHomePage.js":"16","F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\Components\\PokeCard\\styledPokeCard.js":"17"},{"size":738,"mtime":1616891534661,"results":"18","hashOfConfig":"19"},{"size":230,"mtime":1616888255008,"results":"20","hashOfConfig":"19"},{"size":362,"mtime":1616887230094,"results":"21","hashOfConfig":"19"},{"size":707,"mtime":1616890292513,"results":"22","hashOfConfig":"19"},{"size":252,"mtime":1616891397483,"results":"23","hashOfConfig":"19"},{"size":757,"mtime":1616891133240,"results":"24","hashOfConfig":"19"},{"size":534,"mtime":1616891133241,"results":"25","hashOfConfig":"19"},{"size":1454,"mtime":1616890525758,"results":"26","hashOfConfig":"19"},{"size":1174,"mtime":1616890552676,"results":"27","hashOfConfig":"19"},{"size":484,"mtime":1616891133279,"results":"28","hashOfConfig":"19"},{"size":385,"mtime":1616891008633,"results":"29","hashOfConfig":"19"},{"size":1326,"mtime":1616891366067,"results":"30","hashOfConfig":"19"},{"size":1359,"mtime":1616891643824,"results":"31","hashOfConfig":"19"},{"size":1349,"mtime":1616891522715,"results":"32","hashOfConfig":"19"},{"size":1306,"mtime":1616891243378,"results":"33","hashOfConfig":"19"},{"size":159,"mtime":1616891252793,"results":"34","hashOfConfig":"19"},{"size":1053,"mtime":1616891322665,"results":"35","hashOfConfig":"19"},{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"sjjomz",{"filePath":"38","messages":"39","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"44","messages":"45","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"46","messages":"47","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"48","messages":"49","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"50","messages":"51","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"52","messages":"53","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"54","messages":"55","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"56","messages":"57","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"58","messages":"59","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"60","messages":"61","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"62","messages":"63","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"64","messages":"65","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"66","messages":"67","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"68","messages":"69","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\routes\\Router.js",[],"F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\Coordination\\coordination.js",[],"F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\reportWebVitals.js",[],"F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\Components\\PokeCard\\PokeCard.js",[],"F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\App.js",[],"F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\Components\\PokeDetalis\\PokeImage.js",[],"F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\Components\\PokeDetalis\\PokeMoves.js",[],"F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\Components\\PokeDetalis\\PokeStats.js",[],"F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\Components\\PokeDetalis\\styledDetails.js",[],"F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\Components\\PokeDetalis\\PokeType.js",[],"F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\Pages\\DetailsPage\\StyledDetailsPage.js",[],"F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\Pages\\PokedexPage\\PokedexPage.js",[],"F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\global\\GlobalState.js",[],"F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\Components\\Header\\Header.js",[],"F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\Pages\\HomePage\\HomePage.js",[],"F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\Pages\\HomePage\\styledHomePage.js",[],"F:\\LABENU\\portifólio-git\\dumont-pokedex10\\pokedex\\src\\Components\\PokeCard\\styledPokeCard.js",[]]
1 change: 1 addition & 0 deletions pokedex/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/node_modules
/.pnp
.pnp.js
.eslintcache

# testing
/coverage
Expand Down
Binary file removed pokedex/public/favicon.ico
Binary file not shown.
Binary file removed pokedex/public/logo192.png
Binary file not shown.
Binary file removed pokedex/public/logo512.png
Binary file not shown.
25 changes: 0 additions & 25 deletions pokedex/public/manifest.json

This file was deleted.

3 changes: 0 additions & 3 deletions pokedex/public/robots.txt

This file was deleted.

38 changes: 0 additions & 38 deletions pokedex/src/App.css

This file was deleted.

15 changes: 6 additions & 9 deletions pokedex/src/App.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
import React from "react";
import Router from "./routes/Router";
import GlobalState from './Components/global/GlobalState';

import GlobalState from "./global/GlobalState";

function App() {
return (
<div className="App">

<GlobalState>
<Router />
</GlobalState>

<div>
<GlobalState>
<Router />
</GlobalState>
</div>
);
}

export default App;
export default App;
8 changes: 0 additions & 8 deletions pokedex/src/App.test.js

This file was deleted.

37 changes: 37 additions & 0 deletions pokedex/src/Components/Header/Header.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import React, { useContext } from "react";
import { HeaderDiv, Button, Titulo } from "./StyledHeader";
import { useHistory } from "react-router-dom";
import GlobalStateContext from "../../global/GlobalStateContext";
import { goToPageHome, goToPagePokedex } from "../../Coordination/coordination";

export default function Header() {
const states = useContext(GlobalStateContext);
const pokemon = states.pokemonDetails;
const history = useHistory();

return (
<HeaderDiv>
{history.location.pathname === "/" && (
<Button onClick={() => goToPagePokedex(history)}>
Ir para Pokedex
</Button>
)}
{history.location.pathname === "/pokedex" && (
<Button onClick={() => goToPageHome(history)}>Voltar para lista</Button>
)}
{history.location.pathname === "/details" && (
<Button onClick={history.goBack}>Voltar</Button>
)}
{history.location.pathname === "/" && <Titulo>Lista de Pokemons</Titulo>}
{history.location.pathname === "/pokedex" && <Titulo>Pokedex</Titulo>}
{history.location.pathname === "/details" && (
<Titulo>{pokemon.name}</Titulo>
)}
{history.location.pathname === "/details" && (
<Button onClick={() => goToPagePokedex(history)}>
Ir para Pokedex
</Button>
)}
</HeaderDiv>
);
}
36 changes: 36 additions & 0 deletions pokedex/src/Components/Header/StyledHeader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import styled from "styled-components";

export const Titulo = styled.h1`
font-family: SultanNahiaW20;
margin: auto;
color: white;
`;
export const Button = styled.button`
background-color: orangered;
border: none;
outline: none;
color: white;
box-shadow: 1px 1px 2px black;
border-bottom-left-radius: 10px;
border-top-right-radius: 10px;
:hover {
background-color: orangered;
border: none;
}
:active {
box-shadow: none;
}
font-family: SultanNahiaW20;
font-size: 1.2em;
margin-left: 10px;
margin-right: 10px;
`;

export const HeaderDiv = styled.div`
height: 50px;
display: flex;
flex-direction: row;
justify-content: space-around;
align-items: center;
background-color: #30a7d7;
`;
Loading