fix(ui): fix player context call
This commit is contained in:
parent
54adc377e9
commit
22b60af72c
3 changed files with 6 additions and 9 deletions
|
|
@ -13,7 +13,7 @@ function SelectorsList() {
|
|||
return (
|
||||
<NoContent title="No data available." size="small" show={targets && targets.length === 0}>
|
||||
<div className={stl.wrapper}>
|
||||
{targets && targets.map((target, index) => <SelectorCard target={target} index={index} showContent={activeTargetIndex === index} />)}
|
||||
{targets && targets.map((target, index) => <React.Fragment key={index}><SelectorCard target={target} index={index} showContent={activeTargetIndex === index} /></React.Fragment>)}
|
||||
</div>
|
||||
</NoContent>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
import React from 'react';
|
||||
import Marker from './ElementsMarker/Marker';
|
||||
import type { MarkedTarget } from 'Player';
|
||||
|
||||
export default function ElementsMarker({ targets, activeIndex }) {
|
||||
return targets && targets.map(t => <Marker target={t} active={activeIndex === t.index}/>)
|
||||
export default function ElementsMarker({ targets, activeIndex }: { targets: MarkedTarget[], activeIndex: number }) {
|
||||
return targets && targets.map(t => <React.Fragment key={t.index}><Marker target={t} active={activeIndex === t.index}/></React.Fragment>)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ function PlayerBlockHeader(props: any) {
|
|||
const { assistMultiviewStore } = useStore();
|
||||
|
||||
const { width, height, showEvents } = store.get();
|
||||
const toggleEvents = player.toggleEvents;
|
||||
|
||||
const {
|
||||
session,
|
||||
|
|
@ -147,10 +146,10 @@ function PlayerBlockHeader(props: any) {
|
|||
onClick={(tab) => {
|
||||
if (activeTab === tab) {
|
||||
setActiveTab('');
|
||||
toggleEvents();
|
||||
player.toggleEvents();
|
||||
} else {
|
||||
setActiveTab(tab);
|
||||
!showEvents && toggleEvents();
|
||||
!showEvents && player.toggleEvents();
|
||||
}
|
||||
}}
|
||||
border={false}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue