diff --git a/frontend/app/components/Session/Player/LivePlayer/Overlay/LiveOverlay.tsx b/frontend/app/components/Session/Player/LivePlayer/Overlay/LiveOverlay.tsx index 38eef2ba1..89569d7a4 100644 --- a/frontend/app/components/Session/Player/LivePlayer/Overlay/LiveOverlay.tsx +++ b/frontend/app/components/Session/Player/LivePlayer/Overlay/LiveOverlay.tsx @@ -25,13 +25,15 @@ function Overlay({ const { messagesLoading, - cssLoading, peerConnectionStatus, livePlay, calling, remoteControl, recordingState, + tabStates, + currentTab } = store.get() + const cssLoading = tabStates[currentTab].cssLoading || false const loading = messagesLoading || cssLoading const liveStatusText = getStatusText(peerConnectionStatus) const connectionStatus = peerConnectionStatus diff --git a/frontend/app/components/Session_/Exceptions/Exceptions.tsx b/frontend/app/components/Session_/Exceptions/Exceptions.tsx index 987d0f215..969a02271 100644 --- a/frontend/app/components/Session_/Exceptions/Exceptions.tsx +++ b/frontend/app/components/Session_/Exceptions/Exceptions.tsx @@ -25,7 +25,8 @@ interface IProps { function Exceptions({ errorStack, sourcemapUploaded, loading }: IProps) { const { player, store } = React.useContext(PlayerContext); - const { logListNow: logs, exceptionsList: exceptions } = store.get(); + const { tabStates, currentTab } = store.get(); + const { logListNow: logs = [], exceptionsList: exceptions = [] } = tabStates[currentTab] const [filter, setFilter] = React.useState(''); const [currentError, setCurrentErrorVal] = React.useState(null); diff --git a/frontend/app/components/Session_/GraphQL/GraphQL.tsx b/frontend/app/components/Session_/GraphQL/GraphQL.tsx index 11f46d318..8cafc95d3 100644 --- a/frontend/app/components/Session_/GraphQL/GraphQL.tsx +++ b/frontend/app/components/Session_/GraphQL/GraphQL.tsx @@ -14,7 +14,8 @@ function renderDefaultStatus() { function GraphQL() { const { player, store } = React.useContext(PlayerContext); - const { graphqlList: list, graphqlListNow: listNow, time, livePlay } = store.get(); + const { time, livePlay, tabStates, currentTab } = store.get(); + const { graphqlList: list = [], graphqlListNow: listNow = [] } = tabStates[currentTab] const defaultState = { filter: '', diff --git a/frontend/app/components/shared/DevTools/ProfilerPanel/ProfilerPanel.tsx b/frontend/app/components/shared/DevTools/ProfilerPanel/ProfilerPanel.tsx index 0b7a8bfc1..e4a0b2f58 100644 --- a/frontend/app/components/shared/DevTools/ProfilerPanel/ProfilerPanel.tsx +++ b/frontend/app/components/shared/DevTools/ProfilerPanel/ProfilerPanel.tsx @@ -15,8 +15,8 @@ const renderName = (p: any) => ; function ProfilerPanel() { const { store } = React.useContext(PlayerContext) - - const profiles = store.get().profilesList as any[] // TODO lest internal types + const { tabStates, currentTab } = store.get() + const profiles = tabStates[currentTab].profilesList || [] as any[] // TODO lest internal types const { showModal } = useModal(); const [ filter, onFilterChange ] = useInputState() diff --git a/frontend/app/player/web/assist/RemoteControl.ts b/frontend/app/player/web/assist/RemoteControl.ts index 56870995d..4c9021054 100644 --- a/frontend/app/player/web/assist/RemoteControl.ts +++ b/frontend/app/player/web/assist/RemoteControl.ts @@ -134,7 +134,7 @@ export default class RemoteControl { toggleAnnotation(enable?: boolean) { if (typeof enable !== "boolean") { - enable = !!this.store.get().annotating + enable = this.store.get().annotating } if (enable && !this.annot) { const annot = this.annot = new AnnotationCanvas()