main
Last change
on this file since b13f93b was 9bd09b0, checked in by anastasovv <simon@…>, 2 years ago |
Roulette place a bet functionality
|
-
Property mode
set to
100644
|
File size:
799 bytes
|
Rev | Line | |
---|
[87614a5] | 1 | import React from 'react'
|
---|
| 2 |
|
---|
| 3 | import { useSelector } from 'react-redux';
|
---|
| 4 |
|
---|
| 5 | const DisplayBet = () => {
|
---|
| 6 | const playerState = useSelector(state => state.player);
|
---|
| 7 | const styleState = useSelector(state => state.style);
|
---|
| 8 |
|
---|
[9bd09b0] | 9 | 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';
|
---|
[87614a5] | 11 |
|
---|
| 12 | return (
|
---|
| 13 | <div className="blackjackDisplayBet" style={{display: display}}>
|
---|
| 14 | <span>${styleState.blackjack.inputControls.initialBet.chosenCredits}{displaySideBet === 'block' ? ` + $${styleState.blackjack.inputControls.sideBet.chosenCredits}` : ''}</span>
|
---|
| 15 | </div>
|
---|
| 16 | )
|
---|
| 17 | }
|
---|
| 18 |
|
---|
| 19 | export default DisplayBet |
---|
Note:
See
TracBrowser
for help on using the repository browser.