1- import React , { useEffect , useState } from "react"
1+ import React , { useState } from "react"
22import LabelErrorBoundary from "../LabelErrorBoundary"
33// import UniversalDataViewer from "../UniversalDataViewer"
44import UniversalSampleEditor from "../UniversalSampleEditor"
55import Stats from "../Stats"
66import SampleGrid from "../SampleGrid"
77import Box from "@material-ui/core/Box"
8- import usePosthog from "../../hooks/use-posthog"
98import duration from "duration"
109import { styled } from "@material-ui/core/styles"
1110import Tabs from "@material-ui/core/Tabs"
@@ -20,7 +19,6 @@ import useSummary from "../../hooks/use-summary"
2019import useSample from "../../hooks/use-sample"
2120import useRemoveSamples from "../../hooks/use-remove-samples"
2221import useInterface from "../../hooks/use-interface"
23- import useAppConfig from "../../hooks/use-app-config"
2422
2523const OverviewContainer = styled ( "div" ) ( {
2624 padding : 8 ,
@@ -40,16 +38,12 @@ export default ({
4038 sampleTimeToComplete,
4139} ) => {
4240 const [ currentTab , setTab ] = useState ( "label" )
43- const posthog = usePosthog ( )
4441 const labelOnlyMode = useIsLabelOnlyMode ( )
45- const { fromConfig } = useAppConfig ( )
4642 const [ annotationStartTime , setAnnotationStartTime ] = useState ( null )
4743 const { summary } = useSummary ( )
4844 const removeSamples = useRemoveSamples ( )
4945 const { sample, updateSample, sampleLoading } = useSample ( sampleIndex )
5046 const { iface } = useInterface ( )
51-
52- const labelHelpEnabled = ! fromConfig ( "labelhelp.disabled" )
5347 const isInOverview = sampleIndex === null
5448
5549 let percentComplete = 0
@@ -59,18 +53,6 @@ export default ({
5953 summary . samples . length
6054 }
6155
62- useEffect ( ( ) => {
63- if ( labelHelpEnabled ) {
64- posthog . capture ( "label_help_showed" )
65- }
66- } , [ labelHelpEnabled , posthog ] )
67-
68- useEffect ( ( ) => {
69- if ( currentTab === "labelhelp" ) {
70- posthog . capture ( "label_help_clicked" )
71- }
72- } , [ currentTab , posthog ] )
73-
7456 return ! isInOverview ? (
7557 < LabelErrorBoundary >
7658 < UniversalSampleEditor
@@ -94,9 +76,6 @@ export default ({
9476 switch ( nextAction ) {
9577 case "go-to-next" :
9678 if ( sampleIndex !== summary . samples . length - 1 ) {
97- posthog . capture ( "next_sample" , {
98- interface_type : iface ?. type ,
99- } )
10079 // TODO reset start time
10180 onChangeSampleIndex ( sampleIndex + 1 )
10281 setAnnotationStartTime ( Date . now ( ) )
@@ -175,9 +154,6 @@ export default ({
175154 tablePaginationPadding = { 6 }
176155 samples = { summary ?. samples || [ ] }
177156 onClick = { ( selectedSampleIndex ) => {
178- posthog . capture ( "open_sample" , {
179- interface_type : iface ?. type ,
180- } )
181157 onChangeSampleIndex ( selectedSampleIndex )
182158 } }
183159 />
0 commit comments