Ignore:
Timestamp:
07/16/22 11:18:24 (2 years ago)
Author:
anastasovv <simon@…>
Branches:
main
Children:
e007fcd
Parents:
433e0c5
Message:

Added 1 second update_state calls in blackjack

File:
1 edited

Legend:

Unmodified
Added
Removed
  • components/blackjack/DisplayBet.jsx

    r433e0c5 r55701f0  
    66  const playerState = useSelector(state => state.player);
    77  const styleState = useSelector(state => state.style);
    8 
    98  let display = parseInt(playerState.blackjackGame.status.substr(1, 1)) >= 2 ? 'block' : 'none';
    10   let displaySideBet = ( parseInt(playerState.blackjackGame.status.substr(1, 1)) >= 3 && parseInt(styleState.blackjack.inputControls.sideBet.chosenCredits) > 0 ) ? 'block' : 'none';
     9  let displaySideBet = ( parseInt(playerState.blackjackGame.status.substr(1, 1)) >= 3 && parseInt(playerState.blackjackGame.sideBet) > 0 && !playerState.blackjackGame.sideBetOutcomeMessageShown ) ? 'block' : 'none';
    1110
    1211  return (
    1312    <div className="blackjackDisplayBet" style={{display: display}}>
    14       <span>${styleState.blackjack.inputControls.initialBet.chosenCredits}{displaySideBet === 'block' ? ` + $${styleState.blackjack.inputControls.sideBet.chosenCredits}` : ''}</span>
     13      <span>${playerState.blackjackGame.initialBet}{displaySideBet === 'block' ? ` + $${playerState.blackjackGame.sideBet}` : ''}</span>
    1514    </div>
    1615  )
Note: See TracChangeset for help on using the changeset viewer.