client/src/components/SessionSummary.js
author ymh <ymh.work@gmail.com>
Fri, 16 Nov 2018 11:19:13 +0100
changeset 173 0e6703cd0968
parent 170 7da1d5137b0b
child 174 ac1a026edd58
permissions -rw-r--r--
Correct the Note editor. Split the source file in sub components. Correct a timing problem on the editor checkbox.

import React from 'react';
import _ from 'lodash';
import '../App.css';
import './SessionSummary.css'
import {formatTimestamp} from '../utils';

const SessionSummary = ({notes}) => (
  <ul className="list-group sticky-left">
    {notes.map((note) =>
      <li className="list-group-item border-0" key={note._id}>
          <a href={'#note-' + note._id}>
            <small className="note-time text-irinotes-time bg-irinotes-headers border-0 text-center">{formatTimestamp(note.startedAt)}</small>
            <small className="note-length font-weight-bold px-2 text-muted text-center">{_.words(note.plain).length} mots</small>
            <small className="note-time text-irinotes-time bg-irinotes-headers border-0 text-center">{formatTimestamp(note.finishedAt)}</small>
          </a>
      </li>
    )}
  </ul>
)

export default SessionSummary;