client/src/components/Note.js
author Alexandre Segura <mex.zktk@gmail.com>
Thu, 01 Jun 2017 18:46:34 +0200
changeset 17 877d8796b86d
parent 16 e67cd18cc594
child 18 dab2a16500e0
permissions -rw-r--r--
Store serialized HTML in note.

import React from 'react';
import PropTypes from 'prop-types';

const Note = ({note}) => {
  return (
    <div id={"note-" + note.id}>
      <h5>{note.startedAt}  {note.finishedAt}</h5>
      <div dangerouslySetInnerHTML={{ __html: note.html }} />
    </div>
  );
};

Note.propTypes = {
  note: PropTypes.object.isRequired
};

export default Note;