Open source video conferencing app powered by LiveKit. Built with Django and React.
🚩(frontend) disable meeting rating when analytics is not configured
lebaudantoinef2e6edb90dc8
diff --git a/src/frontend/src/features/rooms/components/Rating.tsx b/src/frontend/src/features/rooms/components/Rating.tsxindex d5d45615..3a4f8cc8 100644--- a/src/frontend/src/features/rooms/components/Rating.tsx+++ b/src/frontend/src/features/rooms/components/Rating.tsx@@ -6,6 +6,7 @@ import { styled, VStack } from '@/styled-system/jsx'import { usePostHog } from 'posthog-js/react'import { PostHog } from 'posthog-js'import { Button as RACButton } from 'react-aria-components'+import { useIsAnalyticsEnabled } from '@/features/analytics/hooks/useIsAnalyticsEnabled'const Card = styled('div', {base: {@@ -299,6 +300,7 @@ const AuthenticationMessage = ({}export const Rating = () => {+ const isAnalyticsEnabled = useIsAnalyticsEnabled()const posthog = usePostHog()const isUserAnonymous = useMemo(() => {@@ -307,6 +309,8 @@ export const Rating = () => {const [step, setStep] = useState(0)+ if (!isAnalyticsEnabled) return+if (step == 0) {return <RateQuality posthog={posthog} onNext={() => setStep(step + 1)} />}