Skip to content

Commit

Permalink
Fix: dont handle click when has status
Browse files Browse the repository at this point in the history
  • Loading branch information
ElCaptus committed Jun 1, 2022
1 parent f96b621 commit 4ee51ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/components/Card.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { Component } from "react";
function Card ({pokemon, id, index, handleClick}){
const pokemonClass = pokemon.stat ? ` active ${pokemon.stat}` : ""
const vacio = ()=>{}
handleClick = pokemon.stat == 'correct' ? vacio : handleClick;
handleClick = pokemon.stat ? vacio : handleClick;
return (
<div className={"card-container"+pokemonClass} onClick={()=>handleClick({index})}>
<img src={pokemon.pict} alt={pokemon.name} />
Expand Down

0 comments on commit 4ee51ea

Please sign in to comment.