diff -r 6f3078f7fd47 -r be36eed5e6e0 client/src/components/CreateGroup.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/components/CreateGroup.js Thu Aug 03 17:33:00 2017 +0200
@@ -0,0 +1,124 @@
+import React, { Component } from 'react';
+import { connect } from 'react-redux';
+import { bindActionCreators } from 'redux';
+import { Grid, Row, Col, Panel, FormGroup, ControlLabel, FormControl, Button, Alert, HelpBlock } from 'react-bootstrap';
+import '../App.css';
+import Navbar from './Navbar';
+import * as authActions from '../actions/authActions';
+import { getOnline, getCreateGroup } from '../selectors/authSelectors';
+
+class CreateGroup extends Component {
+
+ state = {
+ name: '',
+ description: ''
+ }
+
+ createGroup = () => {
+
+ const { name, description } = this.state;
+
+ if(name && name.trim() !== "") {
+ this.props.authActions.createGroup(name, description);
+ }
+ }
+
+ submit = (e) => {
+ e.preventDefault();
+
+ this.createGroup();
+ }
+
+ handleInputChange = (e) => {
+ const target = e.target;
+ const value = target.value;
+ const name = target.name;
+
+ this.setState({
+ [name]: value
+ });
+ }
+
+ renderErrorMessage(errorMessages, fieldname) {
+ if (errorMessages && fieldname in errorMessages) {
+ return errorMessages[fieldname].map((message, key) =>
+ { message }