From ebd4fa05675b6f09c1aded503fa2a9acd13b3e67 Mon Sep 17 00:00:00 2001 From: hlbmtc Date: Fri, 22 Nov 2024 14:16:37 +0000 Subject: [PATCH] =?UTF-8?q?Enabled=20communities=20=F0=9F=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../questions/components/question_topics.tsx | 34 +++++++------------ 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/front_end/src/app/(main)/questions/components/question_topics.tsx b/front_end/src/app/(main)/questions/components/question_topics.tsx index 475d5aee4b..1b768960e1 100644 --- a/front_end/src/app/(main)/questions/components/question_topics.tsx +++ b/front_end/src/app/(main)/questions/components/question_topics.tsx @@ -8,13 +8,12 @@ import { import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { sendGAEvent } from "@next/third-parties/google"; import classNames from "classnames"; +import clsx from "clsx"; import { useTranslations } from "next-intl"; -import { useFeatureFlagEnabled } from "posthog-js/react"; import { FC, useMemo, useState } from "react"; -import clsx from "clsx"; - import useFeed from "@/app/(main)/questions/hooks/use_feed"; +import { useContentTranslatedBannerProvider } from "@/app/providers"; import Button from "@/components/ui/button"; import { FeedType, @@ -26,7 +25,6 @@ import useSearchParams from "@/hooks/use_search_params"; import { Topic } from "@/types/projects"; import TopicItem from "./topic_item"; -import { useContentTranslatedBannerProvider } from "@/app/providers"; const EXPAND_THRESHOLD = 2; @@ -60,10 +58,6 @@ const QuestionTopics: FC = ({ topics }) => { hotTopics.length + hotCategories.length > EXPAND_THRESHOLD; const [isMobileExpanded, setIsMobileExpanded] = useState(false); - const isCommunitiesDiscoveryEnabled = useFeatureFlagEnabled( - "communitiesDiscovery" - ); - const { bannerIsVissible: isTranslationBannerVisible } = useContentTranslatedBannerProvider(); @@ -154,19 +148,17 @@ const QuestionTopics: FC = ({ topics }) => { /> )} - {isCommunitiesDiscoveryEnabled && ( - { - sendGAEvent("event", "sidebarClick", { - event_category: "Communities", - }); - switchFeed(FeedType.COMMUNITIES); - }} - isActive={currentFeed === FeedType.COMMUNITIES} - /> - )} + { + sendGAEvent("event", "sidebarClick", { + event_category: "Communities", + }); + switchFeed(FeedType.COMMUNITIES); + }} + isActive={currentFeed === FeedType.COMMUNITIES} + />