99 CheckboxTheme ,
1010} from 'design-system/components/checkbox/checkbox'
1111import { IconButtonTheme } from 'design-system/components/icon-button/icon-button'
12- import { useEffect , useMemo , useState } from 'react'
12+ import { useEffect , useState } from 'react'
1313import { ActivityPlot } from './activity-plot/lazy-activity-plot'
1414import { CaptureDetails } from './capture-details/capture-details'
1515import { CaptureNavigation } from './capture-navigation/capture-navigation'
@@ -51,19 +51,7 @@ export const Playback = ({
5151 }
5252 } , [ activeCapture ] )
5353
54- const detections = useMemo ( ( ) => {
55- if ( ! activeCapture ?. detections ) {
56- return [ ]
57- }
58-
59- if ( ! defaultFilters ) {
60- return activeCapture . detections
61- }
62-
63- return activeCapture . detections . filter (
64- ( detection ) => detection . occurrenceMeetsCriteria
65- )
66- } , [ activeCapture ?. detections , defaultFilters ] )
54+ const detections = activeCapture ?. detections ?? [ ]
6755
6856 if ( ! session . firstCapture ) {
6957 return null
@@ -79,6 +67,7 @@ export const Playback = ({
7967 < CaptureDetails
8068 capture = { activeCapture }
8169 captureId = { activeCaptureId }
70+ defaultFilters = { defaultFilters }
8271 />
8372 </ div >
8473 ) }
@@ -118,11 +107,12 @@ export const Playback = ({
118107 </ div >
119108 </ div >
120109 < Frame
121- src = { activeCapture ?. src }
122- width = { activeCapture ?. width ?? session . firstCapture . width }
123- height = { activeCapture ?. height ?? session . firstCapture . height }
110+ defaultFilters = { defaultFilters }
124111 detections = { detections }
112+ height = { activeCapture ?. height ?? session . firstCapture . height }
125113 showDetections = { showDetections }
114+ src = { activeCapture ?. src }
115+ width = { activeCapture ?. width ?? session . firstCapture . width }
126116 />
127117 < div className = { styles . bottomBar } >
128118 < div className = { styles . captureNavigationWrapper } >
0 commit comments