feat: expand user options for views with schedule (#565)

* feat: expand user options for views with schedule

* fix: selected public id on load

* fix: load events on roll

* style: remove empty container
This commit is contained in:
Carlos Valente
2023-11-03 13:47:38 +01:00
committed by GitHub
parent 1e90ce4c1d
commit 0555d0f400
8 changed files with 70 additions and 13 deletions
@@ -1,5 +1,3 @@
import Empty from '../state/Empty';
import { useSchedule } from './ScheduleContext';
import ScheduleItem from './ScheduleItem';
@@ -13,8 +11,9 @@ interface ScheduleProps {
export default function Schedule({ isProduction, className }: ScheduleProps) {
const { paginatedEvents, selectedEventId, isBackstage, scheduleType } = useSchedule();
// TODO: design a nice placeholder for empty schedules
if (paginatedEvents?.length < 1) {
return <Empty text='No events to show' />;
return null;
}
let selectedState: 'past' | 'now' | 'future' = 'past';