diff --git a/src/status_im/contexts/wallet/account/tabs/dapps/style.cljs b/src/status_im/contexts/wallet/account/tabs/dapps/style.cljs deleted file mode 100644 index f5fde1c6ed..0000000000 --- a/src/status_im/contexts/wallet/account/tabs/dapps/style.cljs +++ /dev/null @@ -1,18 +0,0 @@ -(ns status-im.contexts.wallet.account.tabs.dapps.style - (:require - [quo.foundations.colors :as colors])) - -(def dapps-container - {:padding-horizontal 20 - :padding-vertical 8}) - -(defn dapps-list - [theme] - {:border-radius 16 - :border-width 1 - :border-color (colors/theme-colors colors/neutral-10 colors/neutral-80 theme)}) - -(defn separator - [theme] - {:height 1 - :background-color (colors/theme-colors colors/neutral-10 colors/neutral-80 theme)}) diff --git a/src/status_im/contexts/wallet/account/tabs/dapps/view.cljs b/src/status_im/contexts/wallet/account/tabs/dapps/view.cljs deleted file mode 100644 index 60561f958b..0000000000 --- a/src/status_im/contexts/wallet/account/tabs/dapps/view.cljs +++ /dev/null @@ -1,37 +0,0 @@ -(ns status-im.contexts.wallet.account.tabs.dapps.view - (:require - [quo.core :as quo] - [quo.theme :as quo.theme] - [react-native.core :as rn] - [status-im.common.resources :as resources] - [status-im.contexts.wallet.account.tabs.dapps.style :as style] - [status-im.contexts.wallet.common.empty-tab.view :as empty-tab] - [utils.i18n :as i18n])) - -(defn dapp-options - [] - [quo/action-drawer - [[{:icon :i/browser - :accessibility-label :visit-dapp - :label (i18n/label :t/visit-dapp)} - {:icon :i/disconnect - :accessibility-label :disconnect-dapp - :label (i18n/label :t/disconnect-dapp) - :add-divider? true - :danger? true}]]]) - -(defn view - [] - (let [theme (quo.theme/use-theme) - dapps-list []] - (if (empty? dapps-list) - [empty-tab/view - {:title (i18n/label :t/no-dapps) - :description (i18n/label :t/no-dapps-description) - :image (resources/get-themed-image :no-dapps theme)}] - [rn/view {:style style/dapps-container} - [rn/flat-list - {:data dapps-list - :style (style/dapps-list theme) - :render-fn (fn [item] [quo/dapp item]) - :separator [rn/view {:style (style/separator theme)}]}]]))) diff --git a/src/status_im/contexts/wallet/account/tabs/view.cljs b/src/status_im/contexts/wallet/account/tabs/view.cljs index 45d62bd530..10d499267a 100644 --- a/src/status_im/contexts/wallet/account/tabs/view.cljs +++ b/src/status_im/contexts/wallet/account/tabs/view.cljs @@ -3,7 +3,6 @@ [react-native.core :as rn] [status-im.contexts.wallet.account.tabs.about.view :as about] [status-im.contexts.wallet.account.tabs.assets.view :as assets] - [status-im.contexts.wallet.account.tabs.dapps.view :as dapps] [status-im.contexts.wallet.collectible.options.view :as options-drawer] [status-im.contexts.wallet.common.activity-tab.view :as activity] [status-im.contexts.wallet.common.collectibles-tab.view :as collectibles] @@ -45,5 +44,4 @@ {:title (i18n/label :t/no-permissions) :description (i18n/label :t/no-collectibles-description) :placeholder? true}] - :dapps [dapps/view] [about/view])])) diff --git a/src/status_im/contexts/wallet/account/view.cljs b/src/status_im/contexts/wallet/account/view.cljs index f11421d1ef..9448fb9aac 100644 --- a/src/status_im/contexts/wallet/account/view.cljs +++ b/src/status_im/contexts/wallet/account/view.cljs @@ -13,13 +13,11 @@ (def first-tab-id :assets) -(defn tabs-data - [watch-only?] - (cond-> [{:id :assets :label (i18n/label :t/assets) :accessibility-label :assets-tab} - {:id :collectibles :label (i18n/label :t/collectibles) :accessibility-label :collectibles-tab} - {:id :activity :label (i18n/label :t/activity) :accessibility-label :activity-tab}] - (not watch-only?) (conj {:id :dapps :label (i18n/label :t/dapps) :accessibility-label :dapps}) - :always (conj {:id :about :label (i18n/label :t/about) :accessibility-label :about}))) +(def tabs-data + [{:id :assets :label (i18n/label :t/assets) :accessibility-label :assets-tab} + {:id :collectibles :label (i18n/label :t/collectibles) :accessibility-label :collectibles-tab} + {:id :activity :label (i18n/label :t/activity) :accessibility-label :activity-tab} + {:id :about :label (i18n/label :t/about) :accessibility-label :about}]) (defn- change-tab [id] (rf/dispatch [:wallet/select-account-tab id])) @@ -69,7 +67,7 @@ {:style style/tabs :size 32 :active-tab-id selected-tab - :data (tabs-data watch-only?) + :data tabs-data :on-change change-tab :scrollable? true :scroll-on-press? true}]