AppLayout.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. import React from 'react'
  2. import { Tabs, Tab } from 'react-bootstrap'
  3. class AppLayout extends React.Component {
  4. render () {
  5. const { state } = this.props
  6. const { activeTab } = this.props.state.layout
  7. const { changeTab } = this.props.state.layoutActions
  8. const { PlayerList, MatchList, StartPage, UserList } = this.props.components
  9. return (
  10. <div>
  11. <Tabs activeKey={activeTab} onSelect={changeTab} id='layout-tabs'>
  12. <Tab eventKey={0} title='Setup'>
  13. <StartPage {...state} />
  14. </Tab>
  15. <Tab eventKey={1} title='Users'>
  16. <UserList state={state.users} actions={state.usersActions} />
  17. </Tab>
  18. <Tab eventKey={2} title='PlayerList' >
  19. <PlayerList state={state.playerList} actions={state.playerListActions} />
  20. </Tab>
  21. <Tab eventKey={3} title='Calendar' >
  22. <MatchList state={state.calendar} actions={state.calendarActions} />
  23. </Tab>
  24. <Tab eventKey={4} title='Spielplan' />
  25. <Tab eventKey={5} title='Zahlliste' />
  26. </Tabs>
  27. </div>
  28. )
  29. }
  30. }
  31. export default AppLayout