Fix: Corregir iconos de líder y equipo
- Fix: Usar currentLeaderId en lugar de player.isLeader (evita múltiples L) - Fix: Mostrar estrella verde también en VOTING_TEAM - Ahora solo aparece un icono L (líder actual) - Estrellas verdes visibles para equipo propuesto
This commit is contained in:
@@ -603,7 +603,7 @@ export default function GameBoard({ gameState, currentPlayerId, actions }: GameB
|
|||||||
<div className={`
|
<div className={`
|
||||||
w-16 h-16 rounded-full border-2 overflow-hidden relative shadow-lg bg-black
|
w-16 h-16 rounded-full border-2 overflow-hidden relative shadow-lg bg-black
|
||||||
${isSelected ? 'border-yellow-400 ring-4 ring-yellow-400/30' : 'border-gray-400'}
|
${isSelected ? 'border-yellow-400 ring-4 ring-yellow-400/30' : 'border-gray-400'}
|
||||||
${player.isLeader ? 'ring-2 ring-white' : ''}
|
${gameState.currentLeaderId === player.id ? 'ring-2 ring-white' : ''}
|
||||||
`}>
|
`}>
|
||||||
<Image
|
<Image
|
||||||
src={avatarSrc}
|
src={avatarSrc}
|
||||||
@@ -613,18 +613,23 @@ export default function GameBoard({ gameState, currentPlayerId, actions }: GameB
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Icono de Líder */}
|
{/* Icono de Líder */}
|
||||||
{player.isLeader && (
|
{gameState.currentLeaderId === player.id && (
|
||||||
<div className="absolute bottom-0 right-0 bg-yellow-500 rounded-full p-1 w-6 h-6 flex items-center justify-center text-xs text-black font-bold border border-white z-10">
|
<div className="absolute bottom-0 right-0 bg-yellow-500 rounded-full p-1 w-6 h-6 flex items-center justify-center text-xs text-black font-bold border border-white z-10">
|
||||||
L
|
L
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Icono de Miembro del Equipo de Misión */}
|
{/* Icono de Miembro del Equipo de Misión */}
|
||||||
{gameState.proposedTeam.includes(player.id) && (gameState.phase === GamePhase.MISSION || gameState.phase === 'mission_reveal' as any || gameState.phase === 'mission_result' as any) && (
|
{gameState.proposedTeam.includes(player.id) && (
|
||||||
<div className="absolute top-0 left-0 bg-green-500 rounded-full p-1 w-6 h-6 flex items-center justify-center text-xs text-white font-bold border border-white z-10">
|
gameState.phase === GamePhase.VOTING_TEAM ||
|
||||||
⭐
|
gameState.phase === GamePhase.MISSION ||
|
||||||
</div>
|
gameState.phase === 'mission_reveal' as any ||
|
||||||
)}
|
gameState.phase === 'mission_result' as any
|
||||||
|
) && (
|
||||||
|
<div className="absolute top-0 left-0 bg-green-500 rounded-full p-1 w-6 h-6 flex items-center justify-center text-xs text-white font-bold border border-white z-10">
|
||||||
|
⭐
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Nombre */}
|
{/* Nombre */}
|
||||||
|
|||||||
Reference in New Issue
Block a user