Skip to content

Commit

Permalink
fix pipleine
Browse files Browse the repository at this point in the history
  • Loading branch information
vraja-nayaka committed Oct 25, 2024
1 parent d0e3e9d commit 67c2331
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ export const FireballCanvas: React.FC<FireballCanvasProps> = ({ lastTurnHistory
};

useEffect(() => {
const playerAttack = ['Attack', 'Ultimate'].includes(lastTurnHistory.player.action);
const opponentAttack = ['Attack', 'Ultimate'].includes(lastTurnHistory.opponent.action);
const playerAttack = ['Attack', 'Ultimate'].includes(lastTurnHistory.player.action || '');
const opponentAttack = ['Attack', 'Ultimate'].includes(lastTurnHistory.opponent.action || '');

if (playerAttack) {
if (lastTurnHistory.opponent.isDodged) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export function useParticipants(battleState?: BattleState | null) {
setCurrentPlayers({ player, opponent });
currentPlayersStorage.set({ player, opponent });
}
}, [player, opponent]);
}, [player, opponent, setCurrentPlayers]);

return { participantsMap, allParticipants, hasPlayer, hasOpponent, isAlive, pair, currentPlayers };
}

0 comments on commit 67c2331

Please sign in to comment.