main
Last change
on this file since b13f93b was b13f93b, checked in by anastasovv <simon@…>, 2 years ago |
Made poker tables system and round 1
|
-
Property mode
set to
100644
|
File size:
768 bytes
|
Rev | Line | |
---|
[ace7865] | 1 | import React from 'react'
|
---|
| 2 |
|
---|
[b13f93b] | 3 | import Cards from './sections/Cards'
|
---|
| 4 | import CardsInTheMiddle from './sections/CardsInTheMiddle'
|
---|
| 5 | import Chairs from './sections/Chairs'
|
---|
| 6 | import Messages from './sections/Messages'
|
---|
| 7 | import PlayButtons from './sections/PlayButtons'
|
---|
| 8 | import PickATable from './sections/PickATable'
|
---|
| 9 |
|
---|
| 10 | import { useSelector, useDispatch } from 'react-redux'
|
---|
| 11 |
|
---|
[ace7865] | 12 | const PokerSections = () => {
|
---|
[b13f93b] | 13 | const playerState = useSelector(state => state.player);
|
---|
| 14 |
|
---|
| 15 | if (playerState.pokerGame.player.table.length > 0) {
|
---|
| 16 | return (
|
---|
| 17 | <>
|
---|
| 18 | <Messages/>
|
---|
| 19 |
|
---|
| 20 | <Chairs/>
|
---|
| 21 |
|
---|
| 22 | <Cards/>
|
---|
| 23 |
|
---|
| 24 | <CardsInTheMiddle/>
|
---|
| 25 |
|
---|
| 26 | <PlayButtons/>
|
---|
| 27 | </>
|
---|
| 28 | )
|
---|
| 29 | }
|
---|
| 30 | else {
|
---|
| 31 | return (
|
---|
| 32 | <>
|
---|
| 33 | <PickATable/>
|
---|
| 34 | </>
|
---|
| 35 | )
|
---|
| 36 | }
|
---|
[ace7865] | 37 | }
|
---|
| 38 |
|
---|
| 39 | export default PokerSections |
---|
Note:
See
TracBrowser
for help on using the repository browser.