From f2e6edb90dc8902d62a52fb553948e877d8999d8 Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Mon, 28 Apr 2025 16:21:01 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A9(frontend)=20disable=20meeting=20ra?= =?UTF-8?q?ting=20when=20analytics=20is=20not=20configured?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hide the rating module in the feedback route when analytics service is unavailable to self host La Suite Meet without analytics. --- src/frontend/src/features/rooms/components/Rating.tsx | 4 ++++ 1 file changed, 4 insertions(+) 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)} /> }