Changeset d0ef259 for components/roulette/CoinOnTable.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/CoinOnTable.jsx
r95ce58b rd0ef259 4 4 5 5 const CoinOnTable = () => { 6 const styleState = useSelector(state => state.style);6 const playerState = useSelector(state => state.player); 7 7 8 8 return ( 9 9 <> 10 { styleState.roulette.showCoin && <img id="coinOnTable" src="/gold-coin.cur" alt="Gold coin" style={{zIndex: 20, position: 'absolute', left: `${styleState.roulette.coinPlaced.x}px`, top: `${styleState.roulette.coinPlaced.y}px`, transform: 'translate(-50%, -50%)'}}/>}10 {playerState.rouletteGame?.player.coinPlaced.x && playerState.rouletteGame.player.coinPlaced.x !== -1 && <img id="coinOnTable" src="/gold-coin.cur" alt="Gold coin" style={{zIndex: 20, position: 'absolute', left: `${playerState.rouletteGame.player.coinPlaced.x}px`, top: `${playerState.rouletteGame.player.coinPlaced.y}px`, transform: 'translate(-50%, -50%)'}}/>} 11 11 </> 12 12 )
Note:
See TracChangeset
for help on using the changeset viewer.