client/src/components/NoteInput.js
changeset 74 043477fd5c5c
parent 72 7634b424f426
child 77 cd27d9fc1c73
--- a/client/src/components/NoteInput.js	Thu Jun 22 11:58:27 2017 +0200
+++ b/client/src/components/NoteInput.js	Thu Jun 22 12:09:48 2017 +0200
@@ -1,13 +1,14 @@
 import React, { Component } from 'react';
 import { connect } from 'react-redux';
 import { bindActionCreators } from 'redux';
-import { Form, FormControl, Label } from 'react-bootstrap';
-import moment from 'moment';
+import { Form, FormControl, Button } from 'react-bootstrap';
 
 import PropTypes from 'prop-types';
 import SlateEditor from './SlateEditor';
 import * as notesActions from '../actions/notesActions';
 import * as userActions from '../actions/userActions';
+import { now } from '../utils';
+
 
 class NoteInput extends Component {
 
@@ -38,7 +39,7 @@
       html: html,
 
       startedAt: this.state.startedAt,
-      finishedAt: moment().format('H:mm:ss'),
+      finishedAt: now(),
       categories: categories,
     });
 
@@ -55,20 +56,6 @@
     this.setState({ buttonDisabled: text.length === 0 });
   }
 
-  renderTiming() {
-    if (this.state.startedAt && this.state.finishedAt) {
-      return (
-        <span>
-          <Label>{this.state.startedAt}</Label> ⇒ <Label>{this.state.finishedAt}</Label>
-        </span>
-      )
-    } else {
-      return (
-        <span>No timing</span>
-      )
-    }
-  }
-
   render() {
     return (
       <Form>