@@ -3,7 +3,6 @@ import { useSubscription, useTracker } from '../../lib/ReactMeteorData/react-met
33import _ from 'underscore'
44import { deserializeTimelineBlob , TimelineHash } from '@sofie-automation/corelib/dist/dataModel/Timeline'
55import { applyToArray , clone , normalizeArray } from '@sofie-automation/corelib/dist/lib'
6- import { protectString } from '@sofie-automation/shared-lib/dist/lib/protectedString'
76import { MeteorPubSub } from '@sofie-automation/meteor-lib/dist/api/pubsub'
87import {
98 TimelineState ,
@@ -16,44 +15,35 @@ import {
1615} from 'superfly-timeline'
1716import { TimelineContentObject , transformTimeline } from '@sofie-automation/corelib/dist/playout/timeline'
1817import { useCurrentTime } from '../../lib/lib.js'
19- import { StudioSelect } from './StudioSelect.js'
2018import { useTranslation } from 'react-i18next'
21- import { useParams } from 'react-router-dom'
2219import { useCallback , useEffect , useMemo , useState } from 'react'
2320import Classnames from 'classnames'
24- import { StudioId } from '@sofie-automation/corelib/dist/dataModel/Ids.js'
2521import Row from 'react-bootstrap/Row'
2622import Col from 'react-bootstrap/Col'
2723import Button from 'react-bootstrap/Button'
2824import Form from 'react-bootstrap/Form'
2925import { StudioTimeline } from './collections'
3026
31- interface TimelineViewRouteParams {
32- studioId : string | undefined
33- }
34- function TimelineView ( ) : JSX . Element {
27+ export function TimelineView ( ) : JSX . Element {
3528 const { t } = useTranslation ( )
3629
37- const { studioId } = useParams < TimelineViewRouteParams > ( )
38-
3930 return (
4031 < div className = "mx-5" >
4132 < header className = "my-2" >
4233 < h1 > { t ( 'Timeline' ) } </ h1 >
4334 </ header >
44- < div className = "my-5" > { studioId && < ComponentTimelineSimulate studioId = { protectString ( studioId ) } /> } </ div >
35+ < div className = "my-5" >
36+ < ComponentTimelineSimulate />
37+ </ div >
4538 </ div >
4639 )
4740}
4841
49- interface ITimelineSimulateProps {
50- studioId : StudioId
51- }
52- function ComponentTimelineSimulate ( { studioId } : Readonly < ITimelineSimulateProps > ) {
53- useSubscription ( MeteorPubSub . timelineForStudio , studioId )
42+ function ComponentTimelineSimulate ( ) {
43+ useSubscription ( MeteorPubSub . timelineForStudio )
5444
5545 const now = useCurrentTime ( )
56- const tlComplete = useTracker ( ( ) => StudioTimeline . findOne ( studioId ) , [ studioId ] )
46+ const tlComplete = useTracker ( ( ) => StudioTimeline . findOne ( ) , [ ] )
5747
5848 const [ resolvedTimeline , errorMsgResolve ] = useMemo ( ( ) => {
5949 try {
@@ -466,9 +456,3 @@ function TimelineChangesLog({ resolvedTl, timelineHash }: Readonly<TimelineChang
466456 </ Row >
467457 )
468458}
469-
470- function TimelineStudioSelect ( ) : JSX . Element {
471- return < StudioSelect path = "timeline" title = "Timeline" />
472- }
473-
474- export { TimelineView , TimelineStudioSelect }
0 commit comments