From 883cebac74ebb4d06bb0a570db2a01db4292a834 Mon Sep 17 00:00:00 2001 From: Drew Larson Date: Sun, 1 Jan 2017 17:37:16 -0600 Subject: [PATCH] Ascending ordering for sign in time. --- bikeshop_project/assets/js/components/SignedInList.jsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bikeshop_project/assets/js/components/SignedInList.jsx b/bikeshop_project/assets/js/components/SignedInList.jsx index e0b86b4..5ff730c 100644 --- a/bikeshop_project/assets/js/components/SignedInList.jsx +++ b/bikeshop_project/assets/js/components/SignedInList.jsx @@ -23,8 +23,12 @@ export default class SignedInList extends React.Component { } render () { - let members = this.props.members.map((member) => { - return + const members = this.props.members.sort((l, r) => { + return l.at.diff(r.at); + }) + .reverse() + .map((member) => { + return }); return (