| author | salimr <riwad.salim@yahoo.fr> |
| Fri, 31 Aug 2018 15:14:18 +0200 | |
| changeset 151 | 57d63a248f0d |
| parent 143 | cfcbf4bc66f1 |
| child 161 | a642639dbc07 |
| permissions | -rw-r--r-- |
|
125
c653f49fabfb
remove unecessary dependencies to Redux
ymh <ymh.work@gmail.com>
parents:
124
diff
changeset
|
1 |
import React from 'react'; |
|
63
4088f8dc6b52
Improve session page layout, introduce summary.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff
changeset
|
2 |
import _ from 'lodash'; |
|
4088f8dc6b52
Improve session page layout, introduce summary.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff
changeset
|
3 |
import '../App.css'; |
|
74
043477fd5c5c
add api call to save notes. internally use ts for time data for notes and session
ymh <ymh.work@gmail.com>
parents:
73
diff
changeset
|
4 |
import {formatTimestamp} from '../utils'; |
|
63
4088f8dc6b52
Improve session page layout, introduce summary.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff
changeset
|
5 |
|
|
125
c653f49fabfb
remove unecessary dependencies to Redux
ymh <ymh.work@gmail.com>
parents:
124
diff
changeset
|
6 |
const SessionSummary = ({notes}) => ( |
|
143
cfcbf4bc66f1
Remove react-bootstrap from components except Modal, Collapse and Dropdown
salimr <riwad.salim@yahoo.fr>
parents:
125
diff
changeset
|
7 |
<ul className="list-group"> |
|
125
c653f49fabfb
remove unecessary dependencies to Redux
ymh <ymh.work@gmail.com>
parents:
124
diff
changeset
|
8 |
{notes.map((note) => |
|
143
cfcbf4bc66f1
Remove react-bootstrap from components except Modal, Collapse and Dropdown
salimr <riwad.salim@yahoo.fr>
parents:
125
diff
changeset
|
9 |
<li className="list-group-item" key={note.get('_id')}> |
|
125
c653f49fabfb
remove unecessary dependencies to Redux
ymh <ymh.work@gmail.com>
parents:
124
diff
changeset
|
10 |
<a href={'#note-' + note.get('_id')}> |
|
c653f49fabfb
remove unecessary dependencies to Redux
ymh <ymh.work@gmail.com>
parents:
124
diff
changeset
|
11 |
<span className="text-muted">{formatTimestamp(note.startedAt)} → {formatTimestamp(note.finishedAt)}</span> |
| 151 | 12 |
<span className="float-right">{_.words(note.plain).length} words</span> |
|
125
c653f49fabfb
remove unecessary dependencies to Redux
ymh <ymh.work@gmail.com>
parents:
124
diff
changeset
|
13 |
</a> |
|
143
cfcbf4bc66f1
Remove react-bootstrap from components except Modal, Collapse and Dropdown
salimr <riwad.salim@yahoo.fr>
parents:
125
diff
changeset
|
14 |
</li> |
|
125
c653f49fabfb
remove unecessary dependencies to Redux
ymh <ymh.work@gmail.com>
parents:
124
diff
changeset
|
15 |
)} |
|
143
cfcbf4bc66f1
Remove react-bootstrap from components except Modal, Collapse and Dropdown
salimr <riwad.salim@yahoo.fr>
parents:
125
diff
changeset
|
16 |
</ul> |
|
125
c653f49fabfb
remove unecessary dependencies to Redux
ymh <ymh.work@gmail.com>
parents:
124
diff
changeset
|
17 |
) |
|
63
4088f8dc6b52
Improve session page layout, introduce summary.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff
changeset
|
18 |
|
|
125
c653f49fabfb
remove unecessary dependencies to Redux
ymh <ymh.work@gmail.com>
parents:
124
diff
changeset
|
19 |
export default SessionSummary; |