error and app freezing when deselecting account (#18759)
This commit is contained in:
parent
9acf67dd5b
commit
9dacc9e8af
|
@ -8,12 +8,6 @@
|
||||||
:padding-horizontal 20
|
:padding-horizontal 20
|
||||||
:padding-vertical 12})
|
:padding-vertical 12})
|
||||||
|
|
||||||
(def error-message
|
|
||||||
{:flex-direction :row
|
|
||||||
:gap 4
|
|
||||||
:justify-content :center
|
|
||||||
:margin-bottom 8})
|
|
||||||
|
|
||||||
(def highest-role
|
(def highest-role
|
||||||
{:flex-direction :row
|
{:flex-direction :row
|
||||||
:gap 4
|
:gap 4
|
||||||
|
|
|
@ -53,8 +53,9 @@
|
||||||
{:keys [highest-permission-role]} (rf/sub [:community/token-gated-overview id])
|
{:keys [highest-permission-role]} (rf/sub [:community/token-gated-overview id])
|
||||||
accounts (rf/sub [:wallet/accounts-with-customization-color])
|
accounts (rf/sub [:wallet/accounts-with-customization-color])
|
||||||
selected-addresses (rf/sub [:communities/selected-permission-addresses id])
|
selected-addresses (rf/sub [:communities/selected-permission-addresses id])
|
||||||
highest-role-text (i18n/label (communities.utils/role->translation-key
|
highest-role-text (when highest-permission-role
|
||||||
highest-permission-role))]
|
(i18n/label (communities.utils/role->translation-key
|
||||||
|
highest-permission-role)))]
|
||||||
[rn/safe-area-view {:style style/container}
|
[rn/safe-area-view {:style style/container}
|
||||||
[quo/drawer-top
|
[quo/drawer-top
|
||||||
{:type :context-tag
|
{:type :context-tag
|
||||||
|
@ -73,7 +74,7 @@
|
||||||
:key-fn :address
|
:key-fn :address
|
||||||
:data accounts}]
|
:data accounts}]
|
||||||
|
|
||||||
(when (and highest-permission-role (seq selected-addresses))
|
(if (and highest-permission-role (seq selected-addresses))
|
||||||
[rn/view
|
[rn/view
|
||||||
{:style style/highest-role}
|
{:style style/highest-role}
|
||||||
[quo/text
|
[quo/text
|
||||||
|
@ -84,19 +85,15 @@
|
||||||
{:type :icon
|
{:type :icon
|
||||||
:icon :i/members
|
:icon :i/members
|
||||||
:size 24
|
:size 24
|
||||||
:context highest-role-text}]])
|
:context highest-role-text}]]
|
||||||
|
[quo/info-message
|
||||||
(when (empty? selected-addresses)
|
{:type :error
|
||||||
[rn/view
|
:size :default
|
||||||
{:style style/error-message}
|
:icon :i/info
|
||||||
[quo/icon
|
:style {:justify-content :center}}
|
||||||
:i/info
|
(if (empty? selected-addresses)
|
||||||
{:color colors/danger-50
|
(i18n/label :t/no-addresses-selected)
|
||||||
:size 16}]
|
(i18n/label :t/addresses-dont-contain-tokens-needed))])
|
||||||
[quo/text
|
|
||||||
{:size :paragraph-2
|
|
||||||
:style {:color colors/danger-50}}
|
|
||||||
(i18n/label :t/no-addresses-selected)]])
|
|
||||||
|
|
||||||
[rn/view {:style style/buttons}
|
[rn/view {:style style/buttons}
|
||||||
[quo/button
|
[quo/button
|
||||||
|
|
|
@ -2265,6 +2265,7 @@
|
||||||
"eligible-to-join-as": "Eligible to join as",
|
"eligible-to-join-as": "Eligible to join as",
|
||||||
"you-not-eligible-to-join": "You’re not eligible to join",
|
"you-not-eligible-to-join": "You’re not eligible to join",
|
||||||
"you-hold-number-of-hold-tokens-of-these": "You hold {{number-of-hold-tokens}} of these:",
|
"you-hold-number-of-hold-tokens-of-these": "You hold {{number-of-hold-tokens}} of these:",
|
||||||
|
"addresses-dont-contain-tokens-needed": "These addresses don’t contain tokens needed to join",
|
||||||
"token-gated-communities": "Token gated communities",
|
"token-gated-communities": "Token gated communities",
|
||||||
"read-more": "Read more",
|
"read-more": "Read more",
|
||||||
"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-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.",
|
||||||
|
|
Loading…
Reference in New Issue