diff --git a/src/status_im/contexts/communities/overview/view.cljs b/src/status_im/contexts/communities/overview/view.cljs index 675c1e3656..810097d687 100644 --- a/src/status_im/contexts/communities/overview/view.cljs +++ b/src/status_im/contexts/communities/overview/view.cljs @@ -119,38 +119,29 @@ :icon-left :i/communities} (i18n/label :t/request-to-join)]) -(defn- info-button-handler +(defn token-gated-communities-info [] - (rf/dispatch - [:show-bottom-sheet - {:content - (fn [] - [quo/documentation-drawers - {:title (i18n/label :t/token-gated-communities) - :show-button? true - :button-label (i18n/label :t/read-more) - :button-icon :info} - [quo/text {:size :paragraph-2} - (i18n/label :t/token-gated-communities-info)]])}])) + [quo/documentation-drawers {:title (i18n/label :t/token-gated-communities)} + [quo/text {:size :paragraph-2} + (i18n/label :t/token-gated-communities-info)]]) (defn- token-requirements [{:keys [id color role-permissions?]}] - (let [{:keys [can-request-access? - no-member-permission? - tokens - networks-not-supported? - highest-permission-role]} (rf/sub [:community/token-gated-overview id]) - highest-role-text - (i18n/label - (communities.utils/role->translation-key highest-permission-role :t/member)) - on-press (rn/use-callback (fn [] - (if config/community-accounts-selection-enabled? - (rf/dispatch [:open-modal :community-account-selection-sheet - {:community-id id}]) - (rf/dispatch [:open-modal :community-requests-to-join - {:id - id}]))) - [id])] + (let [{:keys [can-request-access? no-member-permission? networks-not-supported? + highest-permission-role + tokens]} (rf/sub [:community/token-gated-overview id]) + highest-role-text (i18n/label + (communities.utils/role->translation-key highest-permission-role :t/member)) + on-press (rn/use-callback + (fn [] + (if config/community-accounts-selection-enabled? + (rf/dispatch [:open-modal :community-account-selection-sheet + {:community-id id}]) + (rf/dispatch [:open-modal :community-requests-to-join + {:id id}]))) + [id]) + on-press-info #(rf/dispatch + [:show-bottom-sheet {:content token-gated-communities-info}])] (cond networks-not-supported? [network-not-supported] @@ -160,13 +151,12 @@ :else [quo/community-token-gating - {:role highest-role-text - :tokens tokens + {:role highest-role-text + :tokens tokens :community-color color - :satisfied? can-request-access? - :on-press on-press - :on-press-info - info-button-handler}]))) + :satisfied? can-request-access? + :on-press on-press + :on-press-info on-press-info}]))) (defn- join-community [{:keys [id joined permissions] :as community}] diff --git a/translations/en.json b/translations/en.json index 8a83b53ab5..cb525c8cb8 100644 --- a/translations/en.json +++ b/translations/en.json @@ -2486,8 +2486,8 @@ "token-auto-validate-name-error": "Wrong name for token {{symbol}} at address {{address}} - set to {{expected}} but detected as {{actual}}", "token-auto-validate-symbol-error": "Wrong symbol for token {{symbol}} at address {{address}} - set to {{expected}} but detected as {{actual}}", "token-details": "Token details", - "token-gated-communities": "Token gated communities", - "token-gated-communities-info": "Here will be something relevant about this topic. This will help the user get more context and therefore have a better understanding of it.", + "token-gated-communities": "Token-gated communities", + "token-gated-communities-info": "If you want to join a token-gated community, you need to meet the token requirements set by the community Owner.\n\nThe Status app automatically checks if you meet the community requirements. If you meet the requirements, the option to join the community is available.", "token-master": "Token Master", "token-not-available-on-networks": "{{token-symbol}} is not available on {{networks}}.", "token-not-available-on-receiver-networks": "{{token-symbol}} is not available on the recipient’s desired networks. Proceed with caution.",