Refactored PokemonCard a little bit
This commit is contained in:
parent
1f0ab75d6e
commit
2ae23cdbfa
@ -17,12 +17,7 @@ export function formatNumber(num: number) {
|
||||
return '#' + num.toString().padStart(3, '0');
|
||||
}
|
||||
|
||||
export default function PokemonCard({
|
||||
id,
|
||||
name,
|
||||
image,
|
||||
types,
|
||||
}: PokemonCardProps) {
|
||||
const PokemonCard = ({ id, name, image, types }: PokemonCardProps) => {
|
||||
let finalColor;
|
||||
|
||||
if (types.length === 2) {
|
||||
@ -73,4 +68,6 @@ export default function PokemonCard({
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export default PokemonCard;
|
||||
|
Loading…
x
Reference in New Issue
Block a user