client/src/components/SessionSummary.js
author salimr <riwad.salim@yahoo.fr>
Mon, 08 Oct 2018 03:24:47 +0200
changeset 159 a4705c2b4544
parent 151 57d63a248f0d
child 161 a642639dbc07
permissions -rw-r--r--
Add send note options to the editor

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

const SessionSummary = ({notes}) => (
  <ul className="list-group">
    {notes.map((note) =>
      <li className="list-group-item" key={note.get('_id')}>
        <a href={'#note-' + note.get('_id')}>
          <span className="text-muted">{formatTimestamp(note.startedAt)}  {formatTimestamp(note.finishedAt)}</span>
          <span className="float-right">{_.words(note.plain).length} words</span>
        </a>
      </li>
    )}
  </ul>
)

export default SessionSummary;