Skip to content

Commit ca5d002

Browse files
committed
fix(desktop): poker current bet not resetting between substates
AAAAAAAAAAAAAAAAAAAAAAAAAAAAA AN HOUR OF DEBUGGING FOR A SINGLE LINE OF CODE RIGHT NEXT TO ANOTHER LINE OF CODE THAT I DEBUGGED FOR ANOTHER HOUR MONTHS AGO WHY STATE MANAGEMENT WHYYYYYY
1 parent 3ba3f53 commit ca5d002

File tree

1 file changed

+5
-0
lines changed
  • packages/desktop/src/pages/Poker/routes

1 file changed

+5
-0
lines changed

packages/desktop/src/pages/Poker/routes/Round.tsx

+5
Original file line numberDiff line numberDiff line change
@@ -894,8 +894,13 @@ export default function Round() {
894894
tempPokerGame = tempData[0];
895895
tempPokerPlayers = tempData[1];
896896

897+
// This piece of code right here caused me so much pain - twice
898+
// Once when I was debugging the beenOn variable, and later
899+
// when the currentBet being sticky
900+
// AAAAAAAAAAAAAAA I HATE STATE MANAGEMENT
897901
tempPokerPlayers[currentPlayerIndex] = {
898902
...pokerPlayer,
903+
currentBet: tempData[1][currentPlayerIndex].currentBet,
899904
beenOn: tempData[1][currentPlayerIndex].beenOn,
900905
};
901906

0 commit comments

Comments
 (0)