Separate event dipslay from event slot display
Pull out the list of events into its own page sorted by name and show the event slots in chronological order on the schedule page, with past slots hidden by default. This makes the content underneath the schedule the most immediately useful to have in the moment, while the full list is kept separately and in a predictable order.
This commit is contained in:
parent
848a330f3a
commit
ae1c653af6
5 changed files with 198 additions and 5 deletions
|
@ -21,6 +21,12 @@ export function queryToNumber(item?: null | LocationQueryValue | LocationQueryVa
|
|||
return Number.parseInt(item, 10);
|
||||
}
|
||||
|
||||
export function queryToBoolean(item?: null | LocationQueryValue | LocationQueryValue[]) {
|
||||
if (item === undefined)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function idMap<T extends { id: Id }>(entities: T[]) {
|
||||
return new Map(entities.map(entity => [entity.id, entity]));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue