Skip to content

Commit

Permalink
Se elimina archivos de iconos de tipos
Browse files Browse the repository at this point in the history
  • Loading branch information
DannitaZz committed Feb 3, 2022
1 parent 74a7ba4 commit 5c26e7d
Show file tree
Hide file tree
Showing 19 changed files with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/components/pokedetails.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ import axios from 'axios';
import { Chart } from "react-google-charts";
import { Typography, Card, CardContent, CardMedia } from '@mui/material';


function Pokedetails({ pokemon, dispatch }) {
const { id } = useParams();
function upperFirstLetter(str) {
return str.charAt(0).toUpperCase() + str.slice(1);
}
const data = [
["Stat", "Max", {role: 'style'}],
["Stat", "Pts", {role: 'style'}],
["HP", Number(pokemon.stats[0].base_stat), 'color: #D14461'],
["Attack", Number(pokemon.stats[1].base_stat), 'color: #176CC5'],
["Defense", Number(pokemon.stats[2].base_stat), 'color: #63BC5D'],
Expand All @@ -22,7 +21,6 @@ function Pokedetails({ pokemon, dispatch }) {
const options = {
title: "Stats",
chartArea: { width: "50%" },
colors: ['#D14461', '#176CC5', '#63BC5D', '#F1D85A', '#B667CD', '#D87C52'],
isStacked: true,
hAxis: {
title: "Pokémon Stats",
Expand Down Expand Up @@ -50,29 +48,31 @@ function Pokedetails({ pokemon, dispatch }) {
return (
<>

<div>
<Card sx={{ with: '80vw', height: '92vh', display: 'flex', justifyContent: 'center' }}>
<CardContent sx={{ align: 'center' }}>
<Typography component="div" variant="h4" textAlign='center'>
Pokemon #{id} {upperFirstLetter(pokemon.name)}
</Typography>
<div style={{display: 'flex', alignContent: 'center', justifyContent: 'center', marginTop: '3%'}}>
<Card sx={{ height: '80vh', display: 'flex', justifyContent: 'center', justifySelf: 'center', alignSelf: 'center'}}>
<CardContent sx={{ align: 'center'}}>
<CardMedia
component="img"
sx={{ height: '40vh', align: 'center' }}
image={pokemon && pokemon.sprites.other["official-artwork"].front_default}
alt="pokemon"
/>
<Typography component="div" variant="h5" textAlign='center'>
{upperFirstLetter(pokemon.name)}
<br></br>
#{id}
</Typography>
<Typography component="div" variant="p" textAlign='center'>
<hr></hr>
Type: {pokemon && pokemon.types.map((type, i) => {

{pokemon && pokemon.types.map((type, i) => {
return (<li key={'t' + i}>{type.type.name}</li>)
})}
</Typography>
<hr></hr>

<Chart
chartType="BarChart"
width="100%"
height="200px"
height="50%"
data={data}
options={options}
/>
Expand Down
Binary file removed src/img/pokemonTypes/bug.png
Binary file not shown.
Binary file removed src/img/pokemonTypes/dark.png
Binary file not shown.
Binary file removed src/img/pokemonTypes/dragon.png
Binary file not shown.
Binary file removed src/img/pokemonTypes/electric.png
Binary file not shown.
Binary file removed src/img/pokemonTypes/fairy.png
Binary file not shown.
Binary file removed src/img/pokemonTypes/fighting.png
Binary file not shown.
Binary file removed src/img/pokemonTypes/fire.png
Binary file not shown.
Binary file removed src/img/pokemonTypes/flying.png
Binary file not shown.
Binary file removed src/img/pokemonTypes/ghost.png
Binary file not shown.
Binary file removed src/img/pokemonTypes/grass.png
Binary file not shown.
Binary file removed src/img/pokemonTypes/ground.png
Binary file not shown.
Binary file removed src/img/pokemonTypes/ice.png
Binary file not shown.
Binary file removed src/img/pokemonTypes/normal.png
Binary file not shown.
Binary file removed src/img/pokemonTypes/poison.png
Binary file not shown.
Binary file removed src/img/pokemonTypes/psychic.png
Binary file not shown.
Binary file removed src/img/pokemonTypes/rock.png
Binary file not shown.
Binary file removed src/img/pokemonTypes/steel.png
Binary file not shown.
Binary file removed src/img/pokemonTypes/water.png
Binary file not shown.

0 comments on commit 5c26e7d

Please sign in to comment.