| author | ymh <ymh.work@gmail.com> |
| Tue, 13 Nov 2018 16:46:15 +0100 | |
| changeset 172 | 4b780ebbedc6 |
| parent 170 | 7da1d5137b0b |
| child 174 | ac1a026edd58 |
| 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'; |
|
161
a642639dbc07
Split scss files and adapt session page design
salimr <riwad.salim@yahoo.fr>
parents:
151
diff
changeset
|
4 |
import './SessionSummary.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
|
5 |
import {formatTimestamp} from '../utils'; |
|
63
4088f8dc6b52
Improve session page layout, introduce summary.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff
changeset
|
6 |
|
|
125
c653f49fabfb
remove unecessary dependencies to Redux
ymh <ymh.work@gmail.com>
parents:
124
diff
changeset
|
7 |
const SessionSummary = ({notes}) => ( |
|
161
a642639dbc07
Split scss files and adapt session page design
salimr <riwad.salim@yahoo.fr>
parents:
151
diff
changeset
|
8 |
<ul className="list-group sticky-left"> |
|
125
c653f49fabfb
remove unecessary dependencies to Redux
ymh <ymh.work@gmail.com>
parents:
124
diff
changeset
|
9 |
{notes.map((note) => |
|
168
ea92f4fe783d
- move SlateEditor and dependencies to its own folder
ymh <ymh.work@gmail.com>
parents:
161
diff
changeset
|
10 |
<li className="list-group-item border-0" key={note._id}> |
|
ea92f4fe783d
- move SlateEditor and dependencies to its own folder
ymh <ymh.work@gmail.com>
parents:
161
diff
changeset
|
11 |
<a href={'#note-' + note._id}> |
|
170
7da1d5137b0b
Upgrade dependencies and correct theme colors
ymh <ymh.work@gmail.com>
parents:
168
diff
changeset
|
12 |
<small className="note-time text-irinotes-time bg-irinotes-headers border-0 text-center">{formatTimestamp(note.startedAt)}</small> |
|
161
a642639dbc07
Split scss files and adapt session page design
salimr <riwad.salim@yahoo.fr>
parents:
151
diff
changeset
|
13 |
<small className="note-length font-weight-bold px-2 text-muted text-center">{_.words(note.plain).length} mots</small> |
|
170
7da1d5137b0b
Upgrade dependencies and correct theme colors
ymh <ymh.work@gmail.com>
parents:
168
diff
changeset
|
14 |
<small className="note-time text-irinotes-time bg-irinotes-headers border-0 text-center">{formatTimestamp(note.finishedAt)}</small> |
|
161
a642639dbc07
Split scss files and adapt session page design
salimr <riwad.salim@yahoo.fr>
parents:
151
diff
changeset
|
15 |
</a> |
|
143
cfcbf4bc66f1
Remove react-bootstrap from components except Modal, Collapse and Dropdown
salimr <riwad.salim@yahoo.fr>
parents:
125
diff
changeset
|
16 |
</li> |
|
125
c653f49fabfb
remove unecessary dependencies to Redux
ymh <ymh.work@gmail.com>
parents:
124
diff
changeset
|
17 |
)} |
|
143
cfcbf4bc66f1
Remove react-bootstrap from components except Modal, Collapse and Dropdown
salimr <riwad.salim@yahoo.fr>
parents:
125
diff
changeset
|
18 |
</ul> |
|
125
c653f49fabfb
remove unecessary dependencies to Redux
ymh <ymh.work@gmail.com>
parents:
124
diff
changeset
|
19 |
) |
|
63
4088f8dc6b52
Improve session page layout, introduce summary.
Alexandre Segura <mex.zktk@gmail.com>
parents:
diff
changeset
|
20 |
|
|
125
c653f49fabfb
remove unecessary dependencies to Redux
ymh <ymh.work@gmail.com>
parents:
124
diff
changeset
|
21 |
export default SessionSummary; |