diff --git a/client/src/components/GameBoard.tsx b/client/src/components/GameBoard.tsx
index bb07475..af787f0 100644
--- a/client/src/components/GameBoard.tsx
+++ b/client/src/components/GameBoard.tsx
@@ -28,6 +28,9 @@ export default function GameBoard({ gameState, currentPlayerId, actions }: GameB
// Estado para controlar el colapso del panel de jugadores
const [isPlayersCollapsed, setIsPlayersCollapsed] = useState(false);
+ // Estado para controlar el colapso del historial de misiones
+ const [isHistoryCollapsed, setIsHistoryCollapsed] = useState(false);
+
// Timer para avanzar automáticamente en REVEAL_ROLE
useEffect(() => {
@@ -879,47 +882,87 @@ export default function GameBoard({ gameState, currentPlayerId, actions }: GameB
{/* HISTÓRICO DE MISIONES (Esquina superior derecha) */}
{gameState.missionHistory.length > 0 && (
-
-
Historial
-
- {gameState.missionHistory.map((mission, idx) => {
- const isExpanded = expandedMission === idx;
+
+ {/* Botón de colapso/expansión */}
+ setIsHistoryCollapsed(!isHistoryCollapsed)}
+ className="absolute top-0 bg-gradient-to-l from-yellow-600 to-yellow-700 hover:from-yellow-500 hover:to-yellow-600 text-white rounded-l-lg px-2 py-3 shadow-lg border-2 border-yellow-500 border-r-0 transition-all hover:shadow-yellow-500/50 flex items-center"
+ initial={false}
+ animate={{
+ right: isHistoryCollapsed ? '0px' : '100%'
+ }}
+ transition={{ type: "spring", stiffness: 300, damping: 30 }}
+ >
+
+
+
+
- return (
-
-
{
- e.stopPropagation();
- console.log('Click en misión', idx);
- setExpandedMission(prev => prev === idx ? null : idx);
- }}
- >
- {mission.round}
-
+ {/* Panel del historial */}
+
+ Historial
+
+ {gameState.missionHistory.map((mission, idx) => {
+ const isExpanded = expandedMission === idx;
- {/* Lista de participantes */}
- {isExpanded && (
-
- {mission.team.map((playerId) => {
- const player = gameState.players.find(p => p.id === playerId);
- return (
-
- {player?.name || playerId}
-
- );
- })}
+ return (
+
+
{
+ e.stopPropagation();
+ console.log('Click en misión', idx);
+ setExpandedMission(prev => prev === idx ? null : idx);
+ }}
+ >
+ {mission.round}
- )}
-
- );
- })}
-
-
+
+ {/* Lista de participantes */}
+ {isExpanded && (
+
+ {mission.team.map((playerId) => {
+ const player = gameState.players.find(p => p.id === playerId);
+ return (
+
+ {player?.name || playerId}
+
+ );
+ })}
+
+ )}
+
+ );
+ })}
+
+
+
)}