diff -r de8d18c8251d -r a28361bda28c client/src/components/SessionList.js --- a/client/src/components/SessionList.js Mon Sep 03 11:57:58 2018 +0200 +++ b/client/src/components/SessionList.js Mon Sep 03 20:02:14 2018 +0200 @@ -13,17 +13,11 @@ class SessionList extends Component { - constructor(props) { - super(props); - this.state = { + state = { show: false, modalIsOpen: false, sessionToDelete: null, } - this.doSomething = this.doSomething.bind(this); - this.toggleShow = this.toggleShow.bind(this); - this.hide = this.hide.bind(this); - } componentWillMount() { Modal.setAppElement('body'); @@ -34,17 +28,6 @@ console.log(e.target.innerHTML); } - toggleShow(){ - this.setState({show: !this.state.show}); - } - - hide(e){ - if(e && e.relatedTarget){ - e.relatedTarget.click(); - } - this.setState({show: false}); - } - openModal = () => { this.setState({modalIsOpen: true}); } @@ -107,45 +90,36 @@ return (
-
- + {/* */}
-
+
{this.props.sessions.map((session) => - -
- +
+ close +
Êtes-vous sûr(e) de vouloir supprimer cette session ? -
- +