client/src/components/Note.js
author ymh <ymh.work@gmail.com>
Thu, 22 Jun 2017 12:09:48 +0200
changeset 74 043477fd5c5c
parent 33 238818343253
child 78 49c5ea36d0a4
permissions -rw-r--r--
add api call to save notes. internally use ts for time data for notes and session

import React from 'react';
import PropTypes from 'prop-types';
import {formatTimestamp} from '../utils';

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

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

export default Note;