client/src/components/SessionSummary.js
author ymh <ymh.work@gmail.com>
Thu, 20 Jul 2017 23:37:58 +0200
changeset 125 c653f49fabfb
parent 124 c77570164050
child 143 cfcbf4bc66f1
permissions -rw-r--r--
remove unecessary dependencies to Redux

import React from 'react';
import { ListGroup, ListGroupItem } from 'react-bootstrap';
import _ from 'lodash';
import '../App.css';
import {formatTimestamp} from '../utils';

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

export default SessionSummary;