| author | Alexandre Segura <mex.zktk@gmail.com> |
| Thu, 22 Jun 2017 12:37:53 +0200 | |
| changeset 78 | 49c5ea36d0a4 |
| parent 74 | 043477fd5c5c |
| child 79 | 772b73e31069 |
| permissions | -rw-r--r-- |
| 1 | 1 |
import React from 'react'; |
2 |
import PropTypes from 'prop-types'; |
|
|
74
043477fd5c5c
add api call to save notes. internally use ts for time data for notes and session
ymh <ymh.work@gmail.com>
parents:
33
diff
changeset
|
3 |
import {formatTimestamp} from '../utils'; |
| 1 | 4 |
|
5 |
const Note = ({note}) => { |
|
6 |
return ( |
|
|
33
238818343253
Stick editor to bottom.
Alexandre Segura <mex.zktk@gmail.com>
parents:
18
diff
changeset
|
7 |
<div id={"note-" + note._id} className="note"> |
|
74
043477fd5c5c
add api call to save notes. internally use ts for time data for notes and session
ymh <ymh.work@gmail.com>
parents:
33
diff
changeset
|
8 |
<span className="start">{formatTimestamp(note.startedAt)}</span> |
|
043477fd5c5c
add api call to save notes. internally use ts for time data for notes and session
ymh <ymh.work@gmail.com>
parents:
33
diff
changeset
|
9 |
<span className="finish">{formatTimestamp(note.finishedAt)}</span> |
| 78 | 10 |
<div className="note-content" dangerouslySetInnerHTML={{ __html: note.html }} /> |
11 |
<div className="note-margin-comment"> |
|
12 |
<small className="text-muted">{ note.marginComment }</small> |
|
13 |
</div> |
|
| 1 | 14 |
</div> |
15 |
); |
|
16 |
}; |
|
17 |
||
18 |
Note.propTypes = { |
|
19 |
note: PropTypes.object.isRequired |
|
20 |
}; |
|
21 |
||
22 |
export default Note; |