Skip to content
Snippets Groups Projects
Select Git revision
  • b78c43df9ac6f1fa9182930d76a74213e14eaa31
  • master default protected
  • 2023-ujoncdelutan
  • 2023-update
  • 1.4.7 protected
  • 1.4.6 protected
  • 1.4.5 protected
  • 1.4.4 protected
  • 1.4.3 protected
  • 1.4.2 protected
  • 1.4.1 protected
  • 1.4.0 protected
  • 1.3.19 protected
  • 1.3.18 protected
  • 1.3.17 protected
  • 1.3.16 protected
  • 1.3.15 protected
  • 1.3.14 protected
  • 1.3.13 protected
  • 1.3.12 protected
  • 1.3.10 protected
  • 1.3.11 protected
  • 1.3.9 protected
  • 1.3.8 protected
24 results

Statistics.js

Blame
  • Statistics.js 1.18 KiB
    import React, { Component } from 'react';
    import { Container, Menu } from 'semantic-ui-react';
    import Events from './Events'
    import Trainees from './Trainees'
    
    export default class Statistics extends Component {
      state = { activeItem: 'events' }
      handleItemClick = (e, { name }) => this.setState({ activeItem: name })
    
      render() {
        const { activeItem } = this.state
        return (
          <div>
              <Container
                textAlign="center"
                style={{
                  padding: '60px',
                }}
              >
              <Menu
                attached='top'
                tabular
                size='huge'
                compact={true}>
                <Menu.Item
                  name='events'
                  active={activeItem === 'events'}
                  onClick={this.handleItemClick}
                >Alkalmak
                </Menu.Item>
                <Menu.Item
                  name='trainees'
                  active={activeItem === 'trainees'}
                  onClick={this.handleItemClick}
                >Képződők
                </Menu.Item>
              </Menu>
              { activeItem === 'events' ? <Events /> : '' }
              { activeItem === 'trainees' ? <Trainees /> : '' }
            </Container>
          </div>
        );
      }
    }