source: components/roulette/CoinOnTable.jsx@ 433e0c5

main
Last change on this file since 433e0c5 was d0ef259, checked in by anastasovv <simon@…>, 2 years ago

Roulette rethought with 1 second update calls

  • Property mode set to 100644
File size: 606 bytes
Line 
1import React from 'react'
2
3import { useSelector } from 'react-redux';
4
5const CoinOnTable = () => {
6 const playerState = useSelector(state => state.player);
7
8 return (
9 <>
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 </>
12 )
13}
14
15export default CoinOnTable
Note: See TracBrowser for help on using the repository browser.