Ignore:
Timestamp:
07/12/22 00:13:20 (2 years ago)
Author:
anastasovv <simon@…>
Branches:
main
Children:
e9f11ac
Parents:
95ce58b
Message:

Roulette rethought with 1 second update calls

File:
1 edited

Legend:

Unmodified
Added
Removed
  • components/roulette/PlayersDisplay.jsx

    r95ce58b rd0ef259  
    55const PlayersDisplay = () => {
    66    const playerState = useSelector(state => state.player);
    7     const styleState = useSelector(state => state.style);
    87
    98    // See results.
    10     if (playerState.rouletteGame.timeToStart > styleState.roulette.COUNTDOWN_FROM) {
     9    if (playerState.rouletteGame.game.timeToStart > playerState.rouletteGame.game.COUNTDOWN_FROM) {
    1110        return (
    1211            <div className="roulettePlayersContainer">
     
    1413                    <p>Winners:</p>
    1514                    <hr/>
    16                     {playerState.rouletteGame?.players.map((player, i) => (
     15                    {playerState.rouletteGame?.game.players.map((player, i) => (
    1716                        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>
    1817                    ))}
     
    2120                    <p>Losers:</p>
    2221                    <hr/>
    23                     {playerState.rouletteGame?.players.map((player, i) => (
     22                    {playerState.rouletteGame?.game.players.map((player, i) => (
    2423                        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>
    2524                    ))}
     
    3534                    <p>Online:</p>
    3635                    <hr/>
    37                     {playerState.rouletteGame?.players.map((player, i) => (
     36                    {playerState.rouletteGame?.game.players.map((player, i) => (
    3837                        player.status.substr(1, 1) === '1' ? <p key={player + i}>{player.name}</p> : <span key={player + i}></span>
    3938                    ))}
     
    4241                    <p>Betted:</p>
    4342                    <hr/>
    44                     {playerState.rouletteGame?.players.map((player, i) => (
     43                    {playerState.rouletteGame?.game.players.map((player, i) => (
    4544                        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>
    4645                    ))}
Note: See TracChangeset for help on using the changeset viewer.