client/src/components/Note.js
author ymh <ymh.work@gmail.com>
Thu, 22 Jun 2017 12:51:11 +0200
changeset 76 b4f9114b3a86
parent 74 043477fd5c5c
child 78 49c5ea36d0a4
permissions -rw-r--r--
Use sortBy which is more compact

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;