Skip to content

Commit a88c738

Browse files
committed
traits fixed
1 parent fed50ef commit a88c738

File tree

3 files changed

+32
-31
lines changed

3 files changed

+32
-31
lines changed

src/status_im2/contexts/wallet/collectible/style.cljs

+5-5
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@
5858
{:margin-left 6
5959
:flex 1})
6060

61-
(def traits-section
62-
{:margin-horizontal 20
63-
:margin-top 8})
61+
(def traits-title-container
62+
{:margin-left 20
63+
:margin-top 8})
6464

6565
(def traits-item
66-
{:margin-horizontal 6
67-
:flex 1})
66+
{:margin 6
67+
:flex 1})
6868

6969
(def traits-container
7070
{:margin-horizontal 14

src/status_im2/contexts/wallet/collectible/view.cljs

+24-23
Original file line numberDiff line numberDiff line change
@@ -58,28 +58,29 @@
5858

5959
(defn traits-section
6060
[traits]
61-
[rn/view {:style style/traits-section}
62-
[quo/section-label
63-
{:section (i18n/label :t/traits)}]]
64-
65-
[rn/flat-list
66-
{:render-fn (fn [{:keys [title subtitle]}]
67-
[rn/view {:style style/traits-item}
68-
[quo/data-item
69-
{:description :default
70-
:card? true
71-
:status :default
72-
:size :default
73-
:title title
74-
:subtitle subtitle}]])
75-
:data traits
76-
:key :collectibles-list
77-
:key-fn :id
78-
:num-columns 2
79-
:content-container-style style/traits-container}])
61+
(when (pos? (count traits))
62+
[rn/view
63+
[quo/section-label
64+
{:section (i18n/label :t/traits)
65+
:container-style style/traits-title-container}]
66+
[rn/flat-list
67+
{:render-fn (fn [{:keys [trait-type value]}]
68+
[rn/view {:style style/traits-item}
69+
[quo/data-item
70+
{:description :default
71+
:card? true
72+
:status :default
73+
:size :default
74+
:title trait-type
75+
:subtitle value}]])
76+
:data traits
77+
:key :collectibles-list
78+
:key-fn :id
79+
:num-columns 2
80+
:content-container-style style/traits-container}]]))
8081

8182
(defn info
82-
[]
83+
[collectible-id]
8384
[rn/view
8485
{:style style/info-container}
8586
[rn/view {:style style/account}
@@ -104,8 +105,8 @@
104105

105106
(defn view
106107
[]
107-
(let [collectible-details (rf/sub [:wallet/last-collectible-details])
108-
{:keys [name description preview-url traits]} collectible-details]
108+
(let [collectible-details (rf/sub [:wallet/last-collectible-details])
109+
{:keys [name description preview-url id traits]} collectible-details]
109110
[scroll-page/scroll-page
110111
{:navigate-back? true
111112
:height 148
@@ -123,5 +124,5 @@
123124
[header collectible-details]
124125
[cta-buttons]
125126
[tabs]
126-
[info]
127+
[info id]
127128
[traits-section traits]]]))

status-go-version.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
44
"owner": "status-im",
55
"repo": "status-go",
6-
"version": "v0.171.11",
7-
"commit-sha1": "8a4c2d8d2f17117aa0a00338e83b0f753ebf1328",
8-
"src-sha256": "160qnl9dsl1ypvqg9w6z8wps4fvgq3qxi16piymhrlzgssdwkz8h"
6+
"version": "92a604f471d52fccdaeb42da2746f81ea7ebb749",
7+
"commit-sha1": "92a604f471d52fccdaeb42da2746f81ea7ebb749",
8+
"src-sha256": "0i2vwk5r8yap0sz92b976sicszf4yb5z4h9yy0nyab7aq93k30gp"
99
}

0 commit comments

Comments
 (0)