Sort list of upcoming classes

This commit is contained in:
Tanner Collin 2020-03-16 04:57:20 +00:00
parent 5da382ee35
commit 2d20d4ab1e

View File

@ -362,7 +362,7 @@ export function InstructorClassList(props) {
useEffect(() => {
setSameClasses(classes.filter(x =>
moment.utc(x.datetime).tz('America/Edmonton').isSame(input.datetime, 'day')
));
).sort((a, b) => a.datetime > b.datetime ? 1 : -1));
}, [input.datetime]);
return (