From c87e98190231ed7f014cb68eacd4e94f53adcdea Mon Sep 17 00:00:00 2001 From: Omar Basem Date: Wed, 15 May 2024 08:49:33 +0400 Subject: [PATCH] fix: jump-to button positioning (#19990) fix: jump-to button positioning (#19990) --- .../contexts/wallet/account/style.cljs | 4 ++ .../contexts/wallet/account/view.cljs | 3 +- src/status_im/contexts/wallet/home/style.cljs | 6 ++- src/status_im/contexts/wallet/home/view.cljs | 45 ++++++++++--------- 4 files changed, 33 insertions(+), 25 deletions(-) diff --git a/src/status_im/contexts/wallet/account/style.cljs b/src/status_im/contexts/wallet/account/style.cljs index b78b17499f..20d6acad85 100644 --- a/src/status_im/contexts/wallet/account/style.cljs +++ b/src/status_im/contexts/wallet/account/style.cljs @@ -13,3 +13,7 @@ {:padding-top 60 :margin-bottom 12 :padding-horizontal 20}) + +(def shell-button + {:position :absolute + :bottom 12}) diff --git a/src/status_im/contexts/wallet/account/view.cljs b/src/status_im/contexts/wallet/account/view.cljs index 89d5149d1c..0c1c232abe 100644 --- a/src/status_im/contexts/wallet/account/view.cljs +++ b/src/status_im/contexts/wallet/account/view.cljs @@ -73,5 +73,4 @@ {:on-press #(rf/dispatch [:shell/navigate-to-jump-to]) :customization-color customization-color :label (i18n/label :t/jump-to)}} - {:position :absolute - :bottom 0}]])))) + style/shell-button]])))) diff --git a/src/status_im/contexts/wallet/home/style.cljs b/src/status_im/contexts/wallet/home/style.cljs index 030799f652..c44344c346 100644 --- a/src/status_im/contexts/wallet/home/style.cljs +++ b/src/status_im/contexts/wallet/home/style.cljs @@ -1,13 +1,17 @@ (ns status-im.contexts.wallet.home.style (:require [quo.foundations.colors :as colors] - [react-native.safe-area :as safe-area])) + [react-native.safe-area :as safe-area] + [status-im.contexts.shell.jump-to.constants :as constants])) (def tabs {:padding-horizontal 20 :padding-top 8 :padding-bottom 12}) +(def list-container + {:padding-bottom constants/floating-shell-button-height}) + (def accounts-list {:padding-top 8 :padding-bottom 16 diff --git a/src/status_im/contexts/wallet/home/view.cljs b/src/status_im/contexts/wallet/home/view.cljs index 809089e298..73cdd8a152 100644 --- a/src/status_im/contexts/wallet/home/view.cljs +++ b/src/status_im/contexts/wallet/home/view.cljs @@ -86,25 +86,26 @@ [rn/view {:style (style/home-container)} [common.top-nav/view] [refreshable-flat-list/view - {:refresh-control [rn/refresh-control - {:refreshing (and tokens-loading? init-loaded?) - :colors [colors/neutral-40] - :tint-color colors/neutral-40 - :on-refresh #(rf/dispatch [:wallet/get-accounts])}] - :header [rn/view {:style (style/header-container theme)} - [quo/wallet-overview - {:state (if tokens-loading? :loading :default) - :time-frame :none - :metrics :none - :balance formatted-balance - :networks networks - :dropdown-on-press #(rf/dispatch [:show-bottom-sheet - {:content network-filter/view}])}] - (when (ff/enabled? ::ff/wallet.graph) - [quo/wallet-graph {:time-frame :empty}]) - [render-cards cards account-list-ref] - [render-tabs tabs-data set-selected-tab selected-tab]] - :sticky-header-indices [0] - :data [] - :render-fn #() - :footer [tabs/view {:selected-tab selected-tab}]}]])) + {:refresh-control [rn/refresh-control + {:refreshing (and tokens-loading? init-loaded?) + :colors [colors/neutral-40] + :tint-color colors/neutral-40 + :on-refresh #(rf/dispatch [:wallet/get-accounts])}] + :header [rn/view {:style (style/header-container theme)} + [quo/wallet-overview + {:state (if tokens-loading? :loading :default) + :time-frame :none + :metrics :none + :balance formatted-balance + :networks networks + :dropdown-on-press #(rf/dispatch [:show-bottom-sheet + {:content network-filter/view}])}] + (when (ff/enabled? ::ff/wallet.graph) + [quo/wallet-graph {:time-frame :empty}]) + [render-cards cards account-list-ref] + [render-tabs tabs-data set-selected-tab selected-tab]] + :content-container-style style/list-container + :sticky-header-indices [0] + :data [] + :render-fn #() + :footer [tabs/view {:selected-tab selected-tab}]}]]))