From ec4046e5439bd05109623672dcc03a1cd2e440ea Mon Sep 17 00:00:00 2001 From: Flavio Fraschetti Date: Thu, 16 Nov 2023 10:46:17 +0000 Subject: [PATCH] Hide channel list at token-gated communities overview (#17901) This commit hides the categorized channel list for token-gated communities overview. --- .../contexts/communities/overview/view.cljs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/status_im2/contexts/communities/overview/view.cljs b/src/status_im2/contexts/communities/overview/view.cljs index 1e3c68f962..95df0ee1e1 100644 --- a/src/status_im2/contexts/communities/overview/view.cljs +++ b/src/status_im2/contexts/communities/overview/view.cljs @@ -255,7 +255,7 @@ (defn community-content [community] (rf/dispatch [:communities/check-all-community-channels-permissions (:id community)]) - (fn [{:keys [name description joined images tags color id] :as community} + (fn [{:keys [name description joined images tags color id token-permissions] :as community} pending? {:keys [on-category-layout collapsed? @@ -273,12 +273,14 @@ :last-item-style style/last-community-tag :container-style style/community-tag-container}]) [join-community community pending?]] - [channel-list-component - {:on-category-layout on-category-layout - :community-id id - :community-color color - :on-first-channel-height-changed on-first-channel-height-changed} - (add-handlers-to-categorized-chats id chats-by-category joined)]]))) + (when (or (and (seq token-permissions) joined) + (empty? token-permissions)) + [channel-list-component + {:on-category-layout on-category-layout + :community-id id + :community-color color + :on-first-channel-height-changed on-first-channel-height-changed} + (add-handlers-to-categorized-chats id chats-by-category joined)])]))) (defn sticky-category-header [_]