Skip to content

Commit 3f5293e

Browse files
committed
fix volunteer history sort by date
issue: #251
1 parent 0e2dfa9 commit 3f5293e

File tree

1 file changed

+2
-2
lines changed
  • src/client/src/pages/DataView360/View/components

1 file changed

+2
-2
lines changed

src/client/src/pages/DataView360/View/components/Volunteer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ class Volunteer extends Component {
3333

3434
createShiftRows(shifts) {
3535
const shiftsSorted = _.sortBy(shifts, shift => {
36-
return new Date(shift.from).getTime();
37-
});
36+
return new moment(shift.from);
37+
}).reverse();
3838

3939
const lastShifts = shiftsSorted.slice(shiftsSorted.length - SHIFTS_TO_SHOW, shiftsSorted.length)
4040

0 commit comments

Comments
 (0)