You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(client): Restore GameRoom useEffect and re-apply move logic
This commit fixes a major regression introduced in the previous commit where the `useEffect` hook in `GameRoom.jsx` was accidentally deleted. This caused the component to fail to connect to the room state, resulting in player profiles not being displayed.
The fix involves:
1. **Restoring `useEffect`:** The original `useEffect` hook, which contains all the critical logic for setting up `onStateChange` and other message listeners, has been restored.
2. **Re-applying Move Logic:** The state and handlers for interactive checker movement (`selectedPoint`, `handlePointClick`, etc.) have been correctly re-inserted into the component without interfering with the `useEffect` hook.
This resolves the issue of player profiles showing as '...waiting...' and ensures that both the game state synchronization and the interactive move functionality work correctly.
0 commit comments