From 2f12520e722720e5e94ce24a637ca5529d9f0c15 Mon Sep 17 00:00:00 2001 From: Danna Cardenas Date: Thu, 3 Feb 2022 21:32:21 -0500 Subject: [PATCH] se eliminan lineas innecesarias --- README.md | 75 +++++++--------------------------- src/components/pages/login.jsx | 4 +- src/components/pokedetails.jsx | 7 ++-- 3 files changed, 20 insertions(+), 66 deletions(-) diff --git a/README.md b/README.md index 58beeac..c976398 100644 --- a/README.md +++ b/README.md @@ -1,70 +1,25 @@ -# Getting Started with Create React App +# PokeData -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). +![Pokemon](src/img/pokeball.png) -## Available Scripts +Proyecto realizado con React y Material-U consumiendo datos desde [PokéAPI](https://pokeapi.co/) -In the project directory, you can run: +## Características -### `npm start` +-Responsive +-Paginación +-Usuario y favoritos persistentes +-Vistas protegidas -Runs the app in the development mode.\ -Open [http://localhost:3000](http://localhost:3000) to view it in your browser. +### Prospectos -The page will reload when you make changes.\ -You may also see any lint errors in the console. +-Agregar más información a la vista detalles +-Desplegar -### `npm test` +### Cómo usar -Launches the test runner in the interactive watch mode.\ -See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. +Como el usuario es local, las credenciales de acceso son: -### `npm run build` +-user: ash_ketchum +-password: pikachu123 -Builds the app for production to the `build` folder.\ -It correctly bundles React in production mode and optimizes the build for the best performance. - -The build is minified and the filenames include the hashes.\ -Your app is ready to be deployed! - -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. - -### `npm run eject` - -**Note: this is a one-way operation. Once you `eject`, you can't go back!** - -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. - -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. - -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. - -## Learn More - -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). - -To learn React, check out the [React documentation](https://reactjs.org/). - -### Code Splitting - -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) - -### Analyzing the Bundle Size - -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) - -### Making a Progressive Web App - -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) - -### Advanced Configuration - -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) - -### Deployment - -This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) - -### `npm run build` fails to minify - -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) diff --git a/src/components/pages/login.jsx b/src/components/pages/login.jsx index d9ac17f..b5e96e2 100644 --- a/src/components/pages/login.jsx +++ b/src/components/pages/login.jsx @@ -44,10 +44,10 @@ export default function SignIn({state, dispatch}) { if (((currentUser===realUser) && (currentPass===realPass))){ dispatch({type:'login'}) - console.log('correct credentials') + //console.log('correct credentials') navigateTo('/') } else{ - console.log('bad credentials') + //console.log('bad credentials') } }; diff --git a/src/components/pokedetails.jsx b/src/components/pokedetails.jsx index fc5918d..003a40e 100644 --- a/src/components/pokedetails.jsx +++ b/src/components/pokedetails.jsx @@ -6,7 +6,6 @@ import { Typography, Card, CardContent, CardMedia } from '@mui/material'; import Chip from '@mui/material/Chip'; import Stack from '@mui/material/Stack'; -import Box from '@mui/material/Box' import { ReactComponent as Bug } from '../img/bug.svg' import { ReactComponent as Dark } from '../img/dark.svg' import { ReactComponent as Dragon } from '../img/dragon.svg' @@ -79,9 +78,9 @@ function Pokedetails({ pokemon, dispatch }) { let typeOneColor let typeTwoColor const highestStat = Math.max(...pokemon.stats.map((item) => item.base_stat)) - console.log(highestStat) + // console.log(highestStat) - if (pokemon.types.length == 2) { + if (pokemon.types.length === 2) { typeOneColor = typeColors[String(pokemon.types[0].type.name)] typeTwoColor = typeColors[String(pokemon.types[1].type.name)] } else { @@ -147,7 +146,7 @@ function Pokedetails({ pokemon, dispatch }) { getPokeData(); } - , []) + , [id, dispatch]) return ( <>