Order upcoming classes by nearest date
This commit is contained in:
parent
6aa59a46dc
commit
e263a6847f
|
@ -72,13 +72,19 @@ export function Classes(props) {
|
||||||
<Header size='large'>Class List</Header>
|
<Header size='large'>Class List</Header>
|
||||||
|
|
||||||
<Header size='medium'>Upcoming</Header>
|
<Header size='medium'>Upcoming</Header>
|
||||||
|
|
||||||
|
<p>Ordered by nearest date.</p>
|
||||||
|
|
||||||
{classes ?
|
{classes ?
|
||||||
<ClassTable classes={classes.filter(x => x.datetime > now)} />
|
<ClassTable classes={classes.filter(x => x.datetime > now).sort((a, b) => a.datetime > b.datetime ? 1 : -1)} />
|
||||||
:
|
:
|
||||||
<p>Loading...</p>
|
<p>Loading...</p>
|
||||||
}
|
}
|
||||||
|
|
||||||
<Header size='medium'>Recent</Header>
|
<Header size='medium'>Recent</Header>
|
||||||
|
|
||||||
|
<p>Ordered by nearest date.</p>
|
||||||
|
|
||||||
{classes ?
|
{classes ?
|
||||||
<ClassTable classes={classes.filter(x => x.datetime < now)} />
|
<ClassTable classes={classes.filter(x => x.datetime < now)} />
|
||||||
:
|
:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user