clean
This commit is contained in:
parent
cabe377938
commit
aa1ce42079
|
@ -9,7 +9,7 @@
|
|||
[schema.core :as schema]))
|
||||
|
||||
(defn- description-comp
|
||||
[description members-count active-members-count token-gated?]
|
||||
[description members-count active-members-count hide-members-count?]
|
||||
(let [positive-members-count? (pos? members-count)
|
||||
positive-active-members-count? (pos? active-members-count)]
|
||||
[rn/view
|
||||
|
@ -18,7 +18,7 @@
|
|||
:number-of-lines 3
|
||||
:accessibility-label :description}
|
||||
description]
|
||||
(when-not token-gated?
|
||||
(when-not hide-members-count?
|
||||
[rn/view
|
||||
{:style style/stat-container}
|
||||
(when positive-members-count?
|
||||
|
|
|
@ -17,17 +17,17 @@
|
|||
community-name :display-name
|
||||
members-count :members-count
|
||||
community-id :community-id} community
|
||||
token-gated? (rf/sub
|
||||
[:communities/token-gated?
|
||||
token-gated-not-a-member? (rf/sub
|
||||
[:communities/token-gated-not-a-member?
|
||||
community-id])]
|
||||
^{:key url}
|
||||
[quo/internal-link-card
|
||||
{:type :community
|
||||
:size :message
|
||||
:description community-description
|
||||
:members-count members-count
|
||||
:title community-name
|
||||
:banner (:url community-banner)
|
||||
:icon (:url community-icon)
|
||||
:on-press #(rf/dispatch [:universal-links/handle-url url])
|
||||
:token-gated? token-gated?}])))])))
|
||||
{:type :community
|
||||
:size :message
|
||||
:description community-description
|
||||
:members-count members-count
|
||||
:title community-name
|
||||
:banner (:url community-banner)
|
||||
:icon (:url community-icon)
|
||||
:on-press #(rf/dispatch [:universal-links/handle-url url])
|
||||
:hide-members-count? token-gated-not-a-member?}])))])))
|
||||
|
|
|
@ -429,8 +429,8 @@
|
|||
(boolean (some seq all-tokens)))))
|
||||
|
||||
(re-frame/reg-sub
|
||||
:communities/token-gated?
|
||||
:communities/token-gated-not-a-member?
|
||||
(fn [[_ community-id]]
|
||||
[(re-frame/subscribe [:communities/community community-id])])
|
||||
(fn [[{:keys [membership-permissions?]}] _]
|
||||
membership-permissions?))
|
||||
(fn [[{:keys [token-permissions joined]}] _]
|
||||
(and (not joined) (seq token-permissions))))
|
||||
|
|
Loading…
Reference in New Issue