feat: Enhance draft system with 4-player 'pick 2' rules, minimum player count, and fix pack duplication by ensuring unique pack instances.
All checks were successful
Build and Deploy / build (push) Successful in 1m25s

This commit is contained in:
2025-12-16 18:41:43 +01:00
parent 58641b34a5
commit 6163869a17
6 changed files with 90 additions and 5 deletions

View File

@@ -85,8 +85,18 @@ export const GameRoom: React.FC<GameRoomProps> = ({ room: initialRoom, currentPl
const handleDraftUpdate = (data: any) => {
setDraftState(data);
};
const handleDraftError = (error: { message: string }) => {
alert(error.message); // Simple alert for now
};
socket.on('draft_update', handleDraftUpdate);
return () => { socket.off('draft_update', handleDraftUpdate); };
socket.on('draft_error', handleDraftError);
return () => {
socket.off('draft_update', handleDraftUpdate);
socket.off('draft_error', handleDraftError);
};
}, []);
const sendMessage = (e: React.FormEvent) => {