client/src/components/SessionList.js
changeset 155 e55ae84508bf
parent 154 a28361bda28c
child 156 384f4539b76a
--- a/client/src/components/SessionList.js	Mon Sep 03 20:02:14 2018 +0200
+++ b/client/src/components/SessionList.js	Wed Sep 05 12:27:52 2018 +0200
@@ -42,28 +42,6 @@
     this.setState({modalIsOpen: false});
   }
 
-  createSession = () => {
-    const sessionId = uuidV1();
-    let groupName = null;
-    let protocol = null;
-    if(this.props.currentGroup) {
-      groupName = this.props.currentGroup.get('name');
-      protocol = this.props.currentGroup.get('protocol');
-    }
-    if(groupName === null) {
-      groupName = (this.props.currentUser)?this.props.currentUser.get('default_group'):null;
-      if(groupName != null) {
-        const group = this.props.groups.find((g) => g.name === groupName);
-        if(group) {
-          protocol = group.get('protocol');
-        }
-      }
-    }
-
-    this.props.sessionsActions.createSession(sessionId, groupName, protocol);
-    this.props.history.push('/sessions/' + sessionId);
-  }
-
   onClickDelete(session, e) {
     e.preventDefault();
     e.stopPropagation();
@@ -90,7 +68,6 @@
     return (
       <div>
         <Navbar history={this.props.history} />
-        {/* <button id="session-button" type="button" className="btn btn-primary btn-lg text-secondary" onClick={ this.createSession}>Créer une nouvelle session</button> */}
         <div className="container-fluid">
           <div className="row mt-5 pt-5">
                 {this.props.sessions.map((session) =>