Changeset 22367db for components/admin/LiveGames.jsx
- Timestamp:
- 07/19/22 19:38:51 (2 years ago)
- Branches:
- main
- Children:
- 41d3f60
- Parents:
- faff334
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
components/admin/LiveGames.jsx
rfaff334 r22367db 71 71 <h5><Calculations action="calculateHandValue" cards={room.playerCards}/></h5> 72 72 </div> 73 <p>Player {room .displayName} (${parseInt(room.initialBet) + parseInt(room.sideBet)})</p>73 <p>Player {room?.displayName} (${parseInt(room.initialBet) + parseInt(room.sideBet)})</p> 74 74 </div> 75 75 <div> 76 76 <div> 77 77 <h6><span>Status:</span><br/>{room.status}</h6> 78 <h6><span>Outcome:</span><br/>{room.outcome}</h6>79 <h6><span>Side Bet Outcome:</span><br/>{room.sideBetOutcome}</h6>78 { room?.outcome?.length > 0 && <h6><span>Outcome:</span><br/>{room.outcome}</h6> } 79 { room?.sideBetOutcome?.length > 0 && <h6><span>Side Bet Outcome:</span><br/>{room.sideBetOutcome}</h6> } 80 80 </div> 81 81 </div> … … 99 99 <span>Status: </span>{adminInformationState.adminInformation?.liveGames?.roulette?.status} 100 100 <span>Time to start: </span>{adminInformationState.adminInformation?.liveGames?.roulette?.timeToStart} 101 <span>Ball on number: </span>{adminInformationState.adminInformation?.liveGames?.roulette?.magicNumber} 102 <span>Winning bets: </span>{adminInformationState.adminInformation?.liveGames?.roulette?.winningBets?.join(", ")}101 { adminInformationState.adminInformation?.liveGames?.roulette?.magicNumber != -1 && <><span>Ball on number: </span>{adminInformationState.adminInformation?.liveGames?.roulette?.magicNumber} </> } 102 { adminInformationState.adminInformation?.liveGames?.roulette?.magicNumber != -1 && <><span>Winning bets: </span>{adminInformationState.adminInformation?.liveGames?.roulette?.winningBets?.join(", ")}</> } 103 103 </h6> 104 104 <h6 style={{marginTop: '2rem'}}><span>Players:</span></h6> … … 109 109 </div> 110 110 <div> 111 <h6><span>{player.name} (${player .betAmount})</span></h6>111 <h6><span>{player.name} (${player?.betAmount})</span></h6> 112 112 </div> 113 113 <div> 114 <h6><span>Betted on: </span>{player.whichBets.join(", ")}</h6>114 { player?.whichBets?.length > 0 && <h6><span>Betted on: </span>{player?.whichBets?.join(", ")}</h6> } 115 115 </div> 116 116 <div> 117 <h6><span>Outcome: {player.outcome}</span></h6>117 { adminInformationState.adminInformation?.liveGames?.roulette?.magicNumber != -1 && player?.whichBets?.length > 0 && <h6><span>Outcome: </span>{player.outcome}</h6> } 118 118 </div> 119 119 </div> … … 129 129 <span>Round: </span>{table?.round}/4 130 130 <span>Started: </span>{table?.started} 131 <span>Player on turn: </span>{table ?.turnIdx} 132 <span>Pot: </span> {table?.pot} 133 <span>Winners: </span>{table?.winners?.map(e=>e.displayName)?.join(", ")}131 <span>Player on turn: </span>{table.players[table.turnIdx]?.displayName ?? '-'} 132 <span>Pot: </span>${table?.pot} 133 { table?.winners?.length > 0 && <><span>Winners: </span>{table?.winners?.map(e=>e?.displayName)?.join(", ")}</> } 134 134 </h6> 135 135 <div className="cardsOnTable" style={{marginTop: '2rem'}}> … … 142 142 <div key={player.id} className="playerInLivePokerGame"> 143 143 <div> 144 <h6><span>Player {player .displayName} (${player.betAmount})</span></h6>144 <h6><span>Player {player?.displayName} (${player.betAmount})</span></h6> 145 145 </div> 146 146 <div className="cards"> … … 150 150 </div> 151 151 <div> 152 <h6><span>Hand: </span><Calculations action="getBestHandDetails" cards={player.cards} cards2={table.cards}/></h6>152 { table?.cards?.length > 0 && <h6><span>Hand: </span><Calculations action="getBestHandDetails" cards={player.cards} cards2={table.cards}/></h6> } 153 153 </div> 154 154 </div>
Note:
See TracChangeset
for help on using the changeset viewer.