diff --git a/src/frontend/src/features/rooms/components/Rating.tsx b/src/frontend/src/features/rooms/components/Rating.tsx index 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 setStep(step + 1)} /> }