-
Notifications
You must be signed in to change notification settings - Fork 62
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
Solicitando primer pull request #27
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Los commits podrían ser un poco más descriptivos, el uso de nombres, variables, id, clases etc en español ya no será tolerable en el siguiente proyecto, muy bien el trabajo en equipo y progresivo, se nota que respaldaron seguido, muy bien.
src/index.html
Outdated
<option id="grass">grass</option> | ||
<option id= "poison">poison</option> | ||
<option id= "fire">fire</option> | ||
<option id = "fairy">fairy</option> | ||
<option id= "water">water</option> | ||
<option id = "bug">bug</option> | ||
<option id = "normal">normal</option> | ||
<option id = "electric">electric</option> | ||
<option id = "ground">ground</option> | ||
<option id = "fighting">fighting</option> | ||
<option id = "psychic">psychic</option> | ||
<option id = "rock">rock</option> | ||
<option id = "ice">ice</option> | ||
<option id = "ghost">ghost</option> | ||
<option id = "dragon">dragon</option> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Esto pudo crearse dinámicamente con la misma data de los pokemons.
src/main.js
Outdated
@@ -9,7 +9,7 @@ let closeModal = document.querySelectorAll(".close"); | |||
const images = dataPokemon.forEach((item) => { | |||
let image= item.img; | |||
let label= document.createElement('img'); | |||
label.className+=("a" +item.id) | |||
label.id= ("a"+item.type) | |||
let btn= document.createElement('button'); | |||
btn.className+= ("btn-Images") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
className no existe en native, eso es de ReactJS, la forma de trabajar con clases en Vanilla es:
btn.classList.add("btn-Images")
src/main.js
Outdated
@@ -9,7 +9,7 @@ let closeModal = document.querySelectorAll(".close"); | |||
const images = dataPokemon.forEach((item) => { | |||
let image= item.img; | |||
let label= document.createElement('img'); | |||
label.className+=("a" +item.id) | |||
label.id= ("a"+item.type) | |||
let btn= document.createElement('button'); | |||
btn.className+= ("btn-Images") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eviten usar clases con mayusculas o camelCase, btn-images
src/main.js
Outdated
@@ -21,7 +21,7 @@ const images = dataPokemon.forEach((item) => { | |||
//Modal Información Pokemon | |||
|
|||
let btnImg = document.querySelectorAll('.btn-Images'); | |||
let Imgs = btnImg.id | |||
let Imgs = document.querySelector('#a') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eviten las mayusculas en las variables, a menos que se entienda qué es una clase (JS) y porqué se usan Mayusculas en una declaración de clase, bien por el uso de querySelector
src/main.js
Outdated
function onChange(e){ | ||
let value = e.target.value | ||
let nuevaListaFiltrada = dataPokemon.filter(p=>p.type.includes(value)) | ||
console.log(nuevaListaFiltrada) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Evitar español, y cuidado con la identación de las funciones, lo vuelve difícil de leer
src/index.html
Outdated
<a href="#">FUEGO</a> | ||
<a href="#">FUEGO</a> | ||
<a href="#">FUEGO</a> | ||
<a href="#">FUEGO</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mismo link?
src/data.js
Outdated
export const dataPokemon= () => { | ||
//data.pokemon.filter((item) => item.id === Number); | ||
return data.pokemon; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Función inecesaria no crees?
src/main.js
Outdated
let options= document.querySelector(".dropdown-content"); | ||
options.addEventListener('click',onChange) | ||
function onChange(e){ | ||
let value = e.target.value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Muy bien el uso del evento.
No description provided.