Changeset 55701f0 for components/blackjack/DisplayBet.jsx
- Timestamp:
- 07/16/22 11:18:24 (2 years ago)
- Branches:
- main
- Children:
- e007fcd
- Parents:
- 433e0c5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
components/blackjack/DisplayBet.jsx
r433e0c5 r55701f0 6 6 const playerState = useSelector(state => state.player); 7 7 const styleState = useSelector(state => state.style); 8 9 8 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'; 11 10 12 11 return ( 13 12 <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> 15 14 </div> 16 15 )
Note:
See TracChangeset
for help on using the changeset viewer.