Skip to content

Commit

Permalink
fix theme
Browse files Browse the repository at this point in the history
  • Loading branch information
vkjr committed Dec 15, 2023
1 parent 9ead624 commit b11681b
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions src/status_im2/contexts/wallet/collectible/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@
[clojure.string :as string]
[quo.core :as quo]
[quo.foundations.resources :as quo.resources]
[quo.theme :as quo.theme]
[react-native.core :as rn]
[status-im2.common.scroll-page.view :as scroll-page]
[status-im2.contexts.wallet.collectible.style :as style]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))

(defn header
[{:keys [name description] :as _collectible-details} collection-image-url]
[collectible-name description collection-image-url]
[rn/view {:style style/header}
[quo/text
{:weight :semi-bold
:size :heading-1} name]
:size :heading-1} collectible-name]
[rn/view {:style style/collection-container}
[rn/view {:style style/collection-avatar-container}
[quo/collection-avatar {:image collection-image-url}]]
Expand Down Expand Up @@ -130,32 +131,36 @@
:accessibility-label :share-details
:label (i18n/label :t/share-details)}]]])

(defn view
[]
(let [collectible (rf/sub [:wallet/last-collectible-details])
(defn view-internal
[{:keys [theme] :as _props}]
(let [collectible (rf/sub [:wallet/last-collectible-details])
{:keys [collectible-data preview-url
collection-data]} collectible
{:keys [traits name description]} collectible-data
chain-id (rf/sub [:wallet/last-collectible-chain-id])]
collection-data]} collectible
{traits :traits
collectible-name :name
description :description} collectible-data
chain-id (rf/sub [:wallet/last-collectible-chain-id])]
[scroll-page/scroll-page
{:navigate-back? true
:height 148
:page-nav-props {:type :title-description
:title name
:title collectible-name
:description description
:right-side [{:icon-name :i/options
:on-press #(rf/dispatch
[:show-bottom-sheet
{:content collectible-actions-sheet
:theme nil}])}]
:theme theme}])}]
:picture preview-url}}
[rn/view {:style style/container}
[rn/view {:style style/preview-container}
[rn/image
{:source preview-url
:style style/preview}]]
[header collectible-data (:image-url collection-data)]
[header collectible-name description (:image-url collection-data)]
[cta-buttons]
[tabs]
[info chain-id]
[traits-section traits]]]))

(def view (quo.theme/with-theme view-internal))

0 comments on commit b11681b

Please sign in to comment.