Sort list of upcoming classes
This commit is contained in:
parent
5da382ee35
commit
2d20d4ab1e
|
@ -362,7 +362,7 @@ export function InstructorClassList(props) {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setSameClasses(classes.filter(x =>
|
setSameClasses(classes.filter(x =>
|
||||||
moment.utc(x.datetime).tz('America/Edmonton').isSame(input.datetime, 'day')
|
moment.utc(x.datetime).tz('America/Edmonton').isSame(input.datetime, 'day')
|
||||||
));
|
).sort((a, b) => a.datetime > b.datetime ? 1 : -1));
|
||||||
}, [input.datetime]);
|
}, [input.datetime]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user