client/src/components/Note.js
author Alexandre Segura <mex.zktk@gmail.com>
Mon, 12 Jun 2017 18:12:38 +0200
changeset 29 4cfeabef7d5e
parent 18 dab2a16500e0
child 33 238818343253
permissions -rw-r--r--
Store data in PouchDB. - Introduce redux-saga to perform async actions. - Refactor actions to be async.

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

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

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

export default Note;