source:
components/poker/PokerSections.jsx@
433e0c5
Last change on this file since 433e0c5 was 433e0c5, checked in by , 2 years ago | |
---|---|
|
|
File size: 824 bytes |
Rev | Line | |
---|---|---|
[ace7865] | 1 | import React from 'react' |
2 | ||
[b13f93b] | 3 | import CardsInTheMiddle from './sections/CardsInTheMiddle' |
4 | import Chairs from './sections/Chairs' | |
5 | import Messages from './sections/Messages' | |
6 | import PlayButtons from './sections/PlayButtons' | |
7 | import PickATable from './sections/PickATable' | |
8 | ||
[433e0c5] | 9 | import { useSelector } from 'react-redux' |
[3a783f2] | 10 | import Pot from './sections/Pot' |
11 | import RaiseModal from './sections/RaiseModal' | |
[b13f93b] | 12 | |
[ace7865] | 13 | const PokerSections = () => { |
[b13f93b] | 14 | const playerState = useSelector(state => state.player); |
15 | ||
[189cd8f] | 16 | if (playerState.pokerGame?.player?.table?.length > 0) { |
[b13f93b] | 17 | return ( |
18 | <> | |
19 | <Messages/> | |
20 | ||
21 | <Chairs/> | |
22 | ||
23 | <CardsInTheMiddle/> | |
24 | ||
[3a783f2] | 25 | <Pot/> |
26 | ||
[b13f93b] | 27 | <PlayButtons/> |
[3a783f2] | 28 | |
29 | <RaiseModal/> | |
[b13f93b] | 30 | </> |
31 | ) | |
32 | } | |
33 | else { | |
34 | return ( | |
35 | <> | |
36 | <PickATable/> | |
37 | </> | |
38 | ) | |
39 | } | |
[ace7865] | 40 | } |
41 | ||
42 | export default PokerSections |
Note:
See TracBrowser
for help on using the repository browser.