diff -r 183b128a4189 -r a642639dbc07 client/src/components/Note.js --- a/client/src/components/Note.js Mon Oct 08 03:30:54 2018 +0200 +++ b/client/src/components/Note.js Mon Oct 08 04:09:19 2018 +0200 @@ -2,6 +2,7 @@ import PropTypes from 'prop-types'; import { formatTimestamp } from '../utils'; import SlateEditor from './SlateEditor'; +import './Note.css'; class Note extends Component { @@ -18,14 +19,14 @@ const raw = this.refs.editor.asRaw(); const html = this.refs.editor.asHtml(); const categories = this.refs.editor.asCategories(); - const marginComment = this.marginComment.value; + // const marginComment = this.marginComment.value; const data = { plain, raw, html, categories, - marginComment + // marginComment } this.props.onSave(this.props.note, data); @@ -41,7 +42,7 @@ renderNoteContent() { if (this.props.isEditing) { return ( -
+
+
) } - renderNoteMarginComment() { - if (this.props.isEditing) { - return ( -
- { this.marginComment = ref; } } /> - ref={(marginComment) => { this.marginComment = marginComment; }} /> -
- ) - } + // renderNoteMarginComment() { + // if (this.props.isEditing) { + // return ( + //
+ //
+ // { this.marginComment = ref; } } /> + // ref={(marginComment) => { this.marginComment = marginComment; }} /> + //
+ //
+ // ) + // } - return ( -
- { this.props.note.marginComment } -
- ) - } + // return ( + //
+ // { this.props.note.marginComment } + //
+ // ) + // } renderNoteRight() { if (this.props.isEditing) { @@ -95,13 +98,17 @@ render() { return ( -
- { formatTimestamp(this.props.note.startedAt) } - { formatTimestamp(this.props.note.finishedAt) } +
+
+ { formatTimestamp(this.props.note.startedAt) } + { formatTimestamp(this.props.note.finishedAt) } +
{ this.renderNoteContent() } - { this.renderNoteMarginComment() } + {/* { this.renderNoteMarginComment() } */} +
{ this.renderNoteRight() } -
+
+
); }; }