Skip to content

Commit

Permalink
error and app freezing when deselecting account
Browse files Browse the repository at this point in the history
  • Loading branch information
Parveshdhull committed Feb 8, 2024
1 parent 97f9ebd commit ed8e7c2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
:padding-horizontal 20
:padding-vertical 12})

(def error-message
{:flex-direction :row
:gap 4
:justify-content :center
:margin-bottom 8})

(def highest-role
{:flex-direction :row
:gap 4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
accounts (rf/sub [:wallet/accounts-with-customization-color])
selected-addresses (rf/sub [:communities/selected-permission-addresses id])
highest-role-text
(i18n/label
(communities.utils/role->translation-key highest-permission-role))]
(when highest-permission-role
(i18n/label
(communities.utils/role->translation-key highest-permission-role)))]
[rn/safe-area-view {:style style/container}
[quo/drawer-top
{:type :context-tag
Expand All @@ -48,8 +49,7 @@
:content-container-style {:padding 20}
:key-fn :address
:data accounts}]

(when (and highest-permission-role (seq selected-addresses))
(if (and highest-permission-role (seq selected-addresses))
[rn/view
{:style style/highest-role}
[quo/text
Expand All @@ -60,20 +60,15 @@
{:type :icon
:icon :i/members
:size 24
:context highest-role-text}]])

(when (empty? selected-addresses)
[rn/view
{:style style/error-message}
[quo/icon
:i/info
{:color colors/danger-50
:size 16}]
[quo/text
{:size :paragraph-2
:style {:color colors/danger-50}}
(i18n/label :t/no-addresses-selected)]])

:context highest-role-text}]]
[quo/info-message
{:type :error
:size :default
:icon :i/info
:style {:justify-content :center}}
(if (empty? selected-addresses)
(i18n/label :t/no-addresses-selected)
(i18n/label :t/addresses-dont-contain-tokens-needed))])
[rn/view {:style style/buttons}
[quo/button
{:type :grey
Expand Down
1 change: 1 addition & 0 deletions translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2265,6 +2265,7 @@
"eligible-to-join-as": "Eligible to join as",
"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:",
"addresses-dont-contain-tokens-needed": "These addresses don’t contain tokens needed to join",
"token-gated-communities": "Token gated communities",
"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.",
Expand Down

0 comments on commit ed8e7c2

Please sign in to comment.