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

CodeReview #26

Open
wants to merge 66 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
498bfd7
Se agregó HTML
EtnaSI Mar 11, 2020
962161d
Se agregó CSS
EtnaSI Mar 11, 2020
1c91a70
Se agregó BD y JS
LizethRivera04 Mar 11, 2020
291d95b
Index
LizethRivera04 Mar 11, 2020
c7fe2e1
Merge branch 'master' of https://github.com/EtnaSI/CDMX009-Data-Lovers
LizethRivera04 Mar 11, 2020
0617c06
Se integró main y popup
LizethRivera04 Mar 12, 2020
6a2593c
Se modificó boton select Ordenar
EtnaSI Mar 12, 2020
7fb26ba
Se modificó estilo del select Ordenar
EtnaSI Mar 12, 2020
2f8e7e3
A
EtnaSI Mar 12, 2020
f9a3262
Ya todo funcionando, falta depurar código
EtnaSI Mar 12, 2020
fe63a16
Hacer funcionar popups
LizethRivera04 Mar 12, 2020
48f0a08
Funcionando, falta depurar código
EtnaSI Mar 14, 2020
a174687
Update README.md
EtnaSI Mar 16, 2020
b30c08c
Update README.md
EtnaSI Mar 16, 2020
e7bb4c5
Se agregaron imágenes de README
EtnaSI Mar 16, 2020
c5949c6
Listo README
EtnaSI Mar 16, 2020
47ab0b2
Update README.md
EtnaSI Mar 16, 2020
78ac729
Imagenes
EtnaSI Mar 16, 2020
f205589
Update README.md
EtnaSI Mar 16, 2020
07c0547
Update README.md
EtnaSI Mar 16, 2020
86f4f1f
Imágenes README
EtnaSI Mar 17, 2020
9c789a6
Update README.md
EtnaSI Mar 17, 2020
e642d17
Update README.md
EtnaSI Mar 17, 2020
2c9daa1
Delete historiasDeUsuario1.png
EtnaSI Mar 17, 2020
42e52c8
Delete historiasDeUsuario2.png
EtnaSI Mar 17, 2020
f9d00f7
Delete historiasDeUsuario3.png
EtnaSI Mar 17, 2020
07bad53
Delete historiasDeUsuario4.png
EtnaSI Mar 17, 2020
8a6b091
Delete historiasDeUsuario5.png
EtnaSI Mar 17, 2020
7ef740c
Update README.md
EtnaSI Mar 17, 2020
6e05300
Update README.md
EtnaSI Mar 17, 2020
a89951f
Add files via upload
EtnaSI Mar 17, 2020
334b35e
Update README.md
EtnaSI Mar 17, 2020
6052a27
Update README.md
EtnaSI Mar 17, 2020
1d807e5
Update README.md
EtnaSI Mar 17, 2020
1592498
Update README.md
EtnaSI Mar 17, 2020
aebe0a9
Delete historia7.png
EtnaSI Mar 17, 2020
fbae050
Delete historias1-2.png
EtnaSI Mar 17, 2020
87baa1f
Delete historias3-4.png
EtnaSI Mar 17, 2020
fe1a5ec
Delete historias5-6.png
EtnaSI Mar 17, 2020
fc6fa1e
Add files via upload
EtnaSI Mar 17, 2020
01f9050
Update README.md
EtnaSI Mar 17, 2020
a5b72ff
Update README.md
EtnaSI Mar 17, 2020
c9fa370
Update README.md
EtnaSI Mar 17, 2020
55a1575
Update README.md
EtnaSI Mar 17, 2020
dd80434
Cambios al README
EtnaSI Mar 17, 2020
e672262
Por ver el pull
LizethRivera04 Mar 17, 2020
ac91867
Se redujo main, se agregró docs
LizethRivera04 Mar 17, 2020
922fa86
Código depurado, pruebas
EtnaSI Mar 17, 2020
11e69a4
Merge branch 'master' of https://github.com/EtnaSI/CDMX009-Data-Lovers
EtnaSI Mar 17, 2020
7a4c438
Faltaba un div para acomodar las cards
LizethRivera04 Mar 17, 2020
7584b91
Merge branch 'master' of https://github.com/EtnaSI/CDMX009-Data-Lovers
EtnaSI Mar 17, 2020
9ca3575
Se agrega div faltante
EtnaSI Mar 18, 2020
80d5077
Se ajustó el diseño de las tarjetas
EtnaSI Mar 18, 2020
49b1d81
Update README.md
EtnaSI Mar 18, 2020
6006e8c
Update README.md
EtnaSI Mar 18, 2020
b90af45
Update README.md
EtnaSI Mar 19, 2020
69853f2
Se actualizó select Debilidades
EtnaSI Mar 19, 2020
f86a598
Se agregan opciones faltantes al select Debilidades
EtnaSI Mar 19, 2020
421f762
Se agregó footer
EtnaSI Mar 19, 2020
dd42167
Corrección de sintaxis
LizethRivera04 Mar 19, 2020
32386a5
Se corrigió link imagen pokemon
LizethRivera04 Mar 19, 2020
aa16a69
Se corrigió select weaknesses en docs
LizethRivera04 Mar 19, 2020
33239d3
Se depuró sintaxis código
LizethRivera04 Mar 19, 2020
cbdd1c6
Se corrigió select type en docs
LizethRivera04 Mar 19, 2020
084860d
Imagen WebSite
EtnaSI Aug 22, 2020
ef45d43
Add files via upload
EtnaSI Aug 22, 2020
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
69 changes: 34 additions & 35 deletions src/data.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import pokemon from './data/pokemon/pokemon.js';
//console.log(pokemon);
// console.log(pokemon);

const data = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No es necesario crear un objeto, se pueden exportar las funciones e forma independiente

saveNumber: (searchNumber) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Muy bien los nombres de las funciones en ingles

let forNumber = "";
let forNumber = '';
if (searchNumber <= 151) {
forNumber = pokemon.find(nombre => nombre.id === searchNumber)
}else{
} else {
alert('Ingresa un número del 1 al 151');
}
// console.log(forNumber);
return forNumber
return forNumber;
},
showType: (pokemon, whatType) => {
const typeFilter = pokemon.filter(item => {
Expand All @@ -20,53 +20,52 @@ const data = {
},
showWeaknesses: (pokemon, whatWeaknesses) => {
const weaknessesFilter = pokemon.filter(item => {
return item.weaknesses.includes(whatWeaknesses)
})
return weaknessesFilter
return item.weaknesses.includes(whatWeaknesses);
});
return weaknessesFilter;
},
orderNumber: (pokemon, saveOrder) => {
// console.log(pokemon.sort());
console.log(saveOrder);
let orderFilter = "";
// console.log(saveOrder);
let orderFilter = '';
switch (saveOrder) {
case '1-151':
orderFilter = pokemon.sort((a, b) => {
return a.id - b.id;
})
});
break;
case '151-1':
orderFilter = pokemon.sort((a, b) => {
return b.id - a.id;
});
break;
case '151-1':
orderFilter = pokemon.sort((a,b) => {
return b.id - a.id;
});
break;
case 'a-z':
case 'a-z':
orderFilter = pokemon.sort((a, b) => {
if (a.name > b.name) {
return 1;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Se entiende porque se hace esto evitando el ordenado default unicode?

if (a.name < b.name) {
return -1;
}
});
break;
case 'z-a':
if (a.name < b.name) {
return -1;
}
});
break;
case 'z-a':
orderFilter = pokemon.sort((a, b) => {
if (a.name > b.name) {
return -1;
}
if (a.name < b.name) {
return 1;
}
});
break;
if (a.name > b.name) {
return -1;
}
if (a.name < b.name) {
return 1;
}
});
break;
default:
alert('Elige otra opción')
alert('Elige otra opción');
break;
}
return orderFilter;
},
}
},
};
export default data;
// export const filterData = () => {
// return 'filterData';
// return 'filterData';
// };
2 changes: 0 additions & 2 deletions src/data/injuries/injuries.js

This file was deleted.

1 change: 0 additions & 1 deletion src/data/injuries/injuries.json

This file was deleted.

Loading