-
Notifications
You must be signed in to change notification settings - Fork 985
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feat/biometrics-new-settings
- Loading branch information
Showing
5 changed files
with
61 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
src/status_im/contexts/communities/actions/airdrop_addresses/style.cljs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
(ns status-im.contexts.communities.actions.airdrop-addresses.style) | ||
|
||
(def account-list-container | ||
{:flex 1 | ||
:padding-top 12 | ||
:padding-bottom 8}) |
46 changes: 46 additions & 0 deletions
46
src/status_im/contexts/communities/actions/airdrop_addresses/view.cljs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
(ns status-im.contexts.communities.actions.airdrop-addresses.view | ||
(:require | ||
[quo.core :as quo] | ||
[react-native.core :as rn] | ||
[status-im.common.not-implemented :as not-implemented] | ||
[status-im.contexts.communities.actions.airdrop-addresses.style :as style] | ||
[utils.i18n :as i18n] | ||
[utils.re-frame :as rf])) | ||
|
||
(defn- render-item | ||
[item] | ||
[quo/account-item | ||
{:account-props item | ||
:emoji (:emoji item)}]) | ||
|
||
(defn- accounts-list | ||
[{:keys [accounts]}] | ||
[rn/view {:style style/account-list-container} | ||
(when (seq accounts) | ||
[rn/flat-list | ||
{:data accounts | ||
:render-fn render-item | ||
:key-fn :address}])]) | ||
|
||
(defn view | ||
[] | ||
(let [{id :community-id} (rf/sub [:get-screen-params]) | ||
{:keys [name images color]} (rf/sub [:communities/community id]) | ||
logo-uri (get-in images [:thumbnail :uri]) | ||
accounts (->> (rf/sub [:wallet]) | ||
:accounts | ||
vals | ||
(map #(assoc % :customization-color (:color %))))] | ||
[:<> | ||
[quo/drawer-top | ||
{:type :context-tag | ||
:title (i18n/label :t/airdrop-addresses) | ||
:community-name name | ||
:button-icon :i/info | ||
:on-button-press not-implemented/alert | ||
:community-logo (get-in images [:thumbnail :uri]) | ||
:customization-color color}] | ||
[accounts-list | ||
{:accounts accounts | ||
:logo-uri logo-uri | ||
:community-name name}]])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters