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.
This commit is contained in:
Icaro Motta 2024-07-11 22:38:18 -03:00 committed by GitHub
parent 0b5dac0ad0
commit 54e4b597ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 6 deletions

View File

@ -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}
(when config/show-not-implemented-features?
{:id :open
:label (i18n/label :t/open)
:accessibility-label :open-communities-tab}
:accessibility-label :open-communities-tab})
(when config/show-not-implemented-features?
{:id :gated
:label (i18n/label :t/gated)
:accessibility-label :gated-communities-tab}]}]])
:accessibility-label :gated-communities-tab})]}]])
(defn loading-community-item
[_ _ _ {:keys [width]}]