Skip to content

Commit

Permalink
fix: PetGotcha에서 첫번째 카드 아이템을 선택해도 뒤집어지지 않는 오류 (#216)
Browse files Browse the repository at this point in the history
Co-authored-by: kunsanglee <[email protected]>
  • Loading branch information
Todari and kunsanglee authored Oct 29, 2024
1 parent ac52edb commit 4bea62a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/web/src/app/[locale]/shop/PetGotcha/CardFlipGame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const CardFlipGame = ({ onGetPersona, getPersona }: CardFlipGameProps) => {
const [selectedCard, setSelectedCard] = useState<number | null>(null);

const isShaking = selectedCard !== null && getPersona === null; // 카드가 선택되었지만 페르소나가 선택되지 않았을 때
const isFlipped = getPersona && selectedCard; // 뽑힌 페르소나가 정해졌을 때
const isFlipped = getPersona && selectedCard !== null; // 뽑힌 페르소나가 정해졌을 때

const handleCardClick = (index: number) => {
if (selectedCard === null) {
Expand Down

0 comments on commit 4bea62a

Please sign in to comment.