From 99706bab997ecb7e654f0608af10eccf54297c8a Mon Sep 17 00:00:00 2001 From: MarconLP <13001502+MarconLP@users.noreply.github.com> Date: Wed, 20 Nov 2024 13:17:13 +0100 Subject: [PATCH] put demo button behind feature flag --- src/pages/index.tsx | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 18dd71a..538e310 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -25,6 +25,7 @@ const Home: NextPage = () => { const posthog = usePostHog(); const session = useSession(); const router = useRouter(); + const showDemoButton = useFeatureFlagEnabled('show-demo-button') useEffect(() => { if (session.status === "authenticated" && !recordModalOpen) { @@ -87,16 +88,18 @@ const Home: NextPage = () => { (no account required)
- - posthog?.capture("clicked watch recorded demo demo") - } - target="_blank" - href="https://snapify.it/share/clk3mpgnu0003mj0f042964wg" - className="text-sm font-semibold leading-6" - > - Watch recorded demo - + {showDemoButton ? ( + + posthog?.capture("clicked watch recorded demo demo") + } + target="_blank" + href="https://snapify.it/share/clk3mpgnu0003mj0f042964wg" + className="text-sm font-semibold leading-6" + > + Watch recorded demo + + ) : null} posthog?.capture("clicked schedule demo")} target="_blank"