Skip to content

Commit

Permalink
review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vkjr committed Dec 19, 2023
1 parent 4e42028 commit b0d08d5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
31 changes: 15 additions & 16 deletions src/status_im2/contexts/wallet/collectible/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[utils.re-frame :as rf]))

(defn header
[collectible-name description collection-image-url]
[collectible-name collection-name collection-image-url]
[rn/view {:style style/header}
[quo/text
{:weight :semi-bold
Expand All @@ -24,7 +24,7 @@
[quo/text
{:weight :semi-bold
:size :paragraph-1}
description]]])
collection-name]]])

(defn cta-buttons
[]
Expand All @@ -42,7 +42,7 @@
:icon-left :i/opensea}
(i18n/label :t/opensea)]])

(def tabs-data
(def activity-tabs-data
[{:id :overview
:label (i18n/label :t/overview)
:accessibility-label :overview-tab}
Expand Down Expand Up @@ -83,9 +83,7 @@
[item]
[:<>
[quo/divider-date (:timestamp item)]
[quo/wallet-activity
(merge {:on-press #(js/alert "Item pressed")}
item)]])
[quo/wallet-activity item]])

(defn activity-section
[]
Expand Down Expand Up @@ -126,22 +124,22 @@

(defn tabs
[_]
(let [selected-tab (reagent/atom (:id (first tabs-data)))]
(let [selected-tab (reagent/atom (:id (first activity-tabs-data)))]
(fn [{:keys [traits chain-id] :as _props}]
[:<>
[quo/tabs
{:size 32
:style style/tabs
:scrollable? true
:default-active @selected-tab
:data tabs-data
:data activity-tabs-data
:on-change #(reset! selected-tab %)}]
(condp = @selected-tab
:overview [:<>
[info chain-id]
[traits-section traits]]
:activity [activity-section]
[rn/view])])))
nil)])))

(defn collectible-actions-sheet
[]
Expand All @@ -164,19 +162,20 @@

(defn view-internal
[{:keys [theme] :as _props}]
(let [collectible (rf/sub [:wallet/last-collectible-details])
(let [collectible (rf/sub [:wallet/last-collectible-details])
{:keys [collectible-data preview-url
collection-data]} collectible
collection-data]} collectible
{traits :traits
collectible-name :name
description :description} collectible-data
chain-id (rf/sub [:wallet/last-collectible-chain-id])]
collectible-name :name} collectible-data
{collection-image :image-url
collection-name :name} collection-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 collectible-name
:description description
:description collection-name
:right-side [{:icon-name :i/options
:on-press #(rf/dispatch
[:show-bottom-sheet
Expand All @@ -188,7 +187,7 @@
[rn/image
{:source preview-url
:style style/preview}]]
[header collectible-name description (:image-url collection-data)]
[header collectible-name collection-name collection-image]
[cta-buttons]
[tabs
{:traits traits
Expand Down
3 changes: 1 addition & 2 deletions src/status_im2/contexts/wallet/temp.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@
:fourth-tag {:size 24
:type :network
:network-logo (quo.resources/get-network :ethereum)
:network-name "Mainnet"}
}
:network-name "Mainnet"}}
{:transaction :mint
:timestamp "Yesterday"
:status :finalised
Expand Down

0 comments on commit b0d08d5

Please sign in to comment.