Skip to content

Commit

Permalink
Wallet: account screen jump to (#19732)
Browse files Browse the repository at this point in the history
Wallet: account screen jump to (#19732)
  • Loading branch information
OmarBasem committed May 1, 2024
1 parent 3951b8a commit a094d21
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 6 deletions.
6 changes: 6 additions & 0 deletions src/status_im/contexts/wallet/account/tabs/assets/style.cljs
@@ -0,0 +1,6 @@
(ns status-im.contexts.wallet.account.tabs.assets.style
(:require [status-im.contexts.shell.jump-to.constants :as constants]))

(def list-container-style
{:padding-horizontal 8
:padding-bottom constants/floating-shell-button-height})
3 changes: 2 additions & 1 deletion src/status_im/contexts/wallet/account/tabs/assets/view.cljs
Expand Up @@ -2,6 +2,7 @@
(:require
[quo.core :as quo]
[react-native.core :as rn]
[status-im.contexts.wallet.account.tabs.assets.style :as style]
[status-im.contexts.wallet.common.token-value.view :as token-value]
[utils.re-frame :as rf]))

Expand All @@ -20,4 +21,4 @@
:style {:flex 1}
:data tokens
:render-data {:watch-only? watch-only?}
:content-container-style {:padding-horizontal 8}}])))
:content-container-style style/list-container-style}])))
12 changes: 10 additions & 2 deletions src/status_im/contexts/wallet/account/view.cljs
Expand Up @@ -25,7 +25,8 @@
(let [selected-tab (reagent/atom first-tab-id)]
(fn []
(let [{:keys [name color formatted-balance
watch-only?]} (rf/sub [:wallet/current-viewing-account])]
watch-only?]} (rf/sub [:wallet/current-viewing-account])
customization-color (rf/sub [:profile/customization-color])]
[rn/view {:style {:flex 1}}
[account-switcher/view
{:type :wallet-networks
Expand Down Expand Up @@ -55,4 +56,11 @@
:on-change #(reset! selected-tab %)
:scrollable? true
:scroll-on-press? true}]
[tabs/view {:selected-tab @selected-tab}]]))))
[tabs/view {:selected-tab @selected-tab}]
[quo/floating-shell-button
{:jump-to
{:on-press #(rf/dispatch [:shell/navigate-to-jump-to])
:customization-color customization-color
:label (i18n/label :t/jump-to)}}
{:position :absolute
:bottom 0}]]))))
@@ -0,0 +1,6 @@
(ns status-im.contexts.wallet.common.collectibles-tab.style
(:require [status-im.contexts.shell.jump-to.constants :as constants]))

(def list-container-style
{:margin-horizontal 12
:padding-bottom constants/floating-shell-button-height})
Expand Up @@ -5,6 +5,7 @@
[react-native.core :as rn]
[status-im.common.resources :as resources]
[status-im.contexts.wallet.collectible.utils :as utils]
[status-im.contexts.wallet.common.collectibles-tab.style :as style]
[status-im.contexts.wallet.common.empty-tab.view :as empty-tab]
[utils.i18n :as i18n]))

Expand Down Expand Up @@ -50,7 +51,7 @@
[rn/flat-list
{:data collectibles
:style {:flex 1}
:content-container-style {:margin-horizontal 12}
:content-container-style style/list-container-style
:window-size 11
:num-columns 2
:render-fn (fn [item index]
Expand Down
6 changes: 4 additions & 2 deletions src/status_im/contexts/wallet/home/tabs/assets/style.cljs
@@ -1,4 +1,6 @@
(ns status-im.contexts.wallet.home.tabs.assets.style)
(ns status-im.contexts.wallet.home.tabs.assets.style
(:require [status-im.contexts.shell.jump-to.constants :as constants]))

(def list-container
{:padding-horizontal 8})
{:padding-horizontal 8
:padding-bottom constants/floating-shell-button-height})

0 comments on commit a094d21

Please sign in to comment.