Ignore:
Timestamp:
07/03/22 22:59:15 (2 years ago)
Author:
anastasovv <simon@…>
Branches:
main
Children:
3a783f2
Parents:
ace7865
Message:

Made poker tables system and round 1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • components/poker/PokerSections.jsx

    race7865 rb13f93b  
    11import React from 'react'
    22
     3import Cards from './sections/Cards'
     4import CardsInTheMiddle from './sections/CardsInTheMiddle'
     5import Chairs from './sections/Chairs'
     6import Messages from './sections/Messages'
     7import PlayButtons from './sections/PlayButtons'
     8import PickATable from './sections/PickATable'
     9
     10import { useSelector, useDispatch } from 'react-redux'
     11
    312const PokerSections = () => {
    4   return (
    5     <div>
    6        
    7     </div>
    8   )
     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  }
    937}
    1038
Note: See TracChangeset for help on using the changeset viewer.