diff --git a/src/frontend/src/features/rooms/livekit/components/controls/TranscriptToggle.tsx b/src/frontend/src/features/rooms/livekit/components/controls/TranscriptToggle.tsx index 0e186d70..34c16c72 100644 --- a/src/frontend/src/features/rooms/livekit/components/controls/TranscriptToggle.tsx +++ b/src/frontend/src/features/rooms/livekit/components/controls/TranscriptToggle.tsx @@ -3,6 +3,8 @@ import { RiBardLine } from '@remixicon/react' import { useTranslation } from 'react-i18next' import { useSidePanel } from '@/features/rooms/livekit/hooks/useSidePanel' import { css } from '@/styled-system/css' +import { useFeatureFlagEnabled } from 'posthog-js/react' +import { useIsAnalyticsEnabled } from '@/features/analytics/hooks/useIsAnalyticsEnabled' export const TranscriptToggle = () => { const { t } = useTranslation('rooms', { keyPrefix: 'controls.transcript' }) @@ -10,6 +12,11 @@ export const TranscriptToggle = () => { const { isTranscriptOpen, toggleTranscript } = useSidePanel() const tooltipLabel = isTranscriptOpen ? 'open' : 'closed' + const featureEnabled = useFeatureFlagEnabled('transcription-summary') + const isAnalyticsEnabled = useIsAnalyticsEnabled() + + if (!featureEnabled && isAnalyticsEnabled) return + return (