client/src/components/SessionSummary.js
changeset 161 a642639dbc07
parent 151 57d63a248f0d
child 168 ea92f4fe783d
equal deleted inserted replaced
160:183b128a4189 161:a642639dbc07
     1 import React from 'react';
     1 import React from 'react';
     2 import _ from 'lodash';
     2 import _ from 'lodash';
     3 import '../App.css';
     3 import '../App.css';
       
     4 import './SessionSummary.css'
     4 import {formatTimestamp} from '../utils';
     5 import {formatTimestamp} from '../utils';
     5 
     6 
     6 const SessionSummary = ({notes}) => (
     7 const SessionSummary = ({notes}) => (
     7   <ul className="list-group">
     8   <ul className="list-group sticky-left">
     8     {notes.map((note) =>
     9     {notes.map((note) =>
     9       <li className="list-group-item" key={note.get('_id')}>
    10       <li className="list-group-item border-0" key={note.get('_id')}>
    10         <a href={'#note-' + note.get('_id')}>
    11           <a href={'#note-' + note.get('_id')}>
    11           <span className="text-muted">{formatTimestamp(note.startedAt)} → {formatTimestamp(note.finishedAt)}</span>
    12             <small className="note-time text-warning bg-success border-0 text-center">{formatTimestamp(note.startedAt)}</small>
    12           <span className="float-right">{_.words(note.plain).length} words</span>
    13             <small className="note-length font-weight-bold px-2 text-muted text-center">{_.words(note.plain).length} mots</small>
    13         </a>
    14             <small className="note-time text-warning bg-success border-0 text-center">{formatTimestamp(note.finishedAt)}</small>
       
    15           </a>
    14       </li>
    16       </li>
    15     )}
    17     )}
    16   </ul>
    18   </ul>
    17 )
    19 )
    18 
    20