Changeset d0ef259 for components/roulette/PlayersDisplay.jsx
- Timestamp:
- 07/12/22 00:13:20 (2 years ago)
- Branches:
- main
- Children:
- e9f11ac
- Parents:
- 95ce58b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
components/roulette/PlayersDisplay.jsx
r95ce58b rd0ef259 5 5 const PlayersDisplay = () => { 6 6 const playerState = useSelector(state => state.player); 7 const styleState = useSelector(state => state.style);8 7 9 8 // See results. 10 if (playerState.rouletteGame. timeToStart > styleState.roulette.COUNTDOWN_FROM) {9 if (playerState.rouletteGame.game.timeToStart > playerState.rouletteGame.game.COUNTDOWN_FROM) { 11 10 return ( 12 11 <div className="roulettePlayersContainer"> … … 14 13 <p>Winners:</p> 15 14 <hr/> 16 {playerState.rouletteGame?. players.map((player, i) => (15 {playerState.rouletteGame?.game.players.map((player, i) => ( 17 16 player.betAmount > 0 && player.outcome === 'won' ? <p key={player + i}>{player.name} <span style={{color: '#ead24d'}}>[{player.whichBets.toString()}]</span></p> : <span key={player + i}></span> 18 17 ))} … … 21 20 <p>Losers:</p> 22 21 <hr/> 23 {playerState.rouletteGame?. players.map((player, i) => (22 {playerState.rouletteGame?.game.players.map((player, i) => ( 24 23 player.betAmount > 0 && player.outcome === 'lost' ? <p key={player + i}>{player.name} <span style={{color: '#ead24d'}}>[{player.whichBets.toString()}]</span></p> : <span key={player + i}></span> 25 24 ))} … … 35 34 <p>Online:</p> 36 35 <hr/> 37 {playerState.rouletteGame?. players.map((player, i) => (36 {playerState.rouletteGame?.game.players.map((player, i) => ( 38 37 player.status.substr(1, 1) === '1' ? <p key={player + i}>{player.name}</p> : <span key={player + i}></span> 39 38 ))} … … 42 41 <p>Betted:</p> 43 42 <hr/> 44 {playerState.rouletteGame?. players.map((player, i) => (43 {playerState.rouletteGame?.game.players.map((player, i) => ( 45 44 player.status.substr(1, 1) === '2' ? <p key={player + i}>{player.name} <span style={{color: '#ead24d'}}>[{player.whichBets.toString()}]</span></p> : <span key={player + i}></span> 46 45 ))}
Note:
See TracChangeset
for help on using the changeset viewer.