equal
deleted
inserted
replaced
|
1 import React, { Component } from 'react'; |
|
2 import { connect } from 'react-redux'; |
|
3 import { Panel, ListGroup, ListGroupItem } from 'react-bootstrap'; |
|
4 import _ from 'lodash'; |
|
5 import '../App.css'; |
|
6 |
|
7 class SessionSummary extends Component { |
|
8 render() { |
|
9 return ( |
|
10 <Panel> |
|
11 <ListGroup> |
|
12 {this.props.notes.map((note) => |
|
13 <ListGroupItem key={note.get('_id')}> |
|
14 <a href={'#note-' + note.get('_id')}> |
|
15 <span className="text-muted">{note.startedAt} → {note.finishedAt}</span> |
|
16 <span className="pull-right">{_.words(note.plain).length} words</span> |
|
17 </a> |
|
18 </ListGroupItem> |
|
19 )} |
|
20 </ListGroup> |
|
21 </Panel> |
|
22 ); |
|
23 } |
|
24 } |
|
25 |
|
26 function mapStateToProps(state, props) { |
|
27 return props; |
|
28 } |
|
29 |
|
30 export default connect(mapStateToProps)(SessionSummary); |