Skip to content

Commit

Permalink
hide second section networks if second-section-networks array is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
briansztamfater committed May 8, 2024
1 parent 6a09720 commit 72a87cd
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions src/status_im/contexts/wallet/sheets/network_preferences/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,20 @@
:on-change #(toggle-network (:network-name
network))}))
first-section-networks)}]
[quo/category
{:list-type :settings
:blur? blur?
:label (or second-section-label (i18n/label :t/layer-2))
:data (mapv (fn [network]
(utils/make-network-item {:state @state
:network-name (:network-name network)
:color color
:normal-checkbox? receiver?
:networks (get-current-preferences-names)
:on-change #(toggle-network (:network-name
network))}))
second-section-networks)}]
(when (not-empty second-section-networks)
[quo/category
{:list-type :settings
:blur? blur?
:label (or second-section-label (i18n/label :t/layer-2))
:data (mapv (fn [network]
(utils/make-network-item {:state @state
:network-name (:network-name network)
:color color
:normal-checkbox? receiver?
:networks (get-current-preferences-names)
:on-change #(toggle-network (:network-name
network))}))
second-section-networks)}])
[quo/bottom-actions
{:actions :one-action
:blur? blur?
Expand Down

0 comments on commit 72a87cd

Please sign in to comment.