Skip to content
Snippets Groups Projects
Select Git revision
  • e6481dc43f4fbc925f7aa93bc57ce840db45fbcd
  • 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

Groups.js

Blame
  • Groups.js 1.23 KiB
    import React, { Component } from 'react';
    import { Container, Header, Segment, Divider } from 'semantic-ui-react';
    import './Groups.css';
    import GroupCard from '../extra/GroupCard'
    
    import { connect } from 'react-redux';
    import { getGroups } from '../../actions/groups';
    
    
    class Groups extends Component {
      componentWillMount() {
        this.props.getGroups()
      }
    
      render() {
        return (
          <div>
            <Segment inverted textAlign='center' vertical>
              <Container>
                <Header
                  as='h1'
                  content='Köreink'
                  inverted
                  style={{
                    fontSize: '3em',
                    fontWeight: 'normal',
                    marginBottom: 0,
                    marginTop: '0.5em',
                  }}
                />
              </Container>
            </Segment>
                  
            <Segment style={{ padding: '1em 0em 5em' }} vertical>
              <Container text>
                { this.props.groups.map(item => {
                  return <GroupCard key={item.id} label={item.name} value={item.description}/>
                })}
              </Container>
            </Segment>
          </div>
        );
      }
    }
    
    const mapStateToProps = ({ groups }) => ({ groups });
    
    export default connect(mapStateToProps, { getGroups })(Groups);