From 54e4b597edc6b7dd785cfa26b586085f287c2f1d Mon Sep 17 00:00:00 2001 From: Icaro Motta Date: Thu, 11 Jul 2024 22:38:18 -0300 Subject: [PATCH] chore(communities): Hide non-implemented tabs in Discover communities (#20684) Tabs "Open" and "Gated" in Discover communities screen were never implemented in the code, they are dummies. We now hide them under the flag config/show-not-implemented-features?, which is disabled for users. Fixes: https://github.com/status-im/status-mobile/issues/20682 To avoid regressions and be quicker, I opted to not remove the "All" tab even though is the only one shown now, as that would require me to check non-trivial code due to the fact that the tabs can be sticky as the user scrolls. --- .../contexts/communities/discover/view.cljs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/status_im/contexts/communities/discover/view.cljs b/src/status_im/contexts/communities/discover/view.cljs index 6b92ac815b..a491ab820a 100644 --- a/src/status_im/contexts/communities/discover/view.cljs +++ b/src/status_im/contexts/communities/discover/view.cljs @@ -8,6 +8,7 @@ [react-native.safe-area :as safe-area] [reagent.core :as reagent] [status-im.common.scroll-page.view :as scroll-page] + [status-im.config :as config] [status-im.contexts.communities.actions.community-options.view :as options] [status-im.contexts.communities.discover.style :as style] [status-im.feature-flags :as ff] @@ -76,12 +77,14 @@ :data [{:id :all :label (i18n/label :t/all) :accessibility-label :all-communities-tab} - {:id :open - :label (i18n/label :t/open) - :accessibility-label :open-communities-tab} - {:id :gated - :label (i18n/label :t/gated) - :accessibility-label :gated-communities-tab}]}]]) + (when config/show-not-implemented-features? + {:id :open + :label (i18n/label :t/open) + :accessibility-label :open-communities-tab}) + (when config/show-not-implemented-features? + {:id :gated + :label (i18n/label :t/gated) + :accessibility-label :gated-communities-tab})]}]]) (defn loading-community-item [_ _ _ {:keys [width]}]