mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-19 06:04:05 +00:00
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:
@@ -1,5 +1,6 @@
|
||||
/* eslint-disable react/display-name */
|
||||
import { ComponentType, useMemo } from 'react';
|
||||
import { SupportedEvent } from 'ontime-types';
|
||||
import { useStore } from 'zustand';
|
||||
|
||||
import useProjectData from '../../common/hooks-query/useProjectData';
|
||||
@@ -20,7 +21,7 @@ const withData = <P extends object>(Component: ComponentType<P>) => {
|
||||
|
||||
const publicEvents = useMemo(() => {
|
||||
if (Array.isArray(rundownData)) {
|
||||
return rundownData.filter((e) => e.type === 'event' && e.title && e.isPublic);
|
||||
return rundownData.filter((e) => e.type === SupportedEvent.Event && e.title && e.isPublic);
|
||||
}
|
||||
return [];
|
||||
}, [rundownData]);
|
||||
|
||||
Reference in New Issue
Block a user