Skip to content

Commit a52fda2

Browse files
committed
lint
1 parent c50db2f commit a52fda2

File tree

3 files changed

+67
-67
lines changed

3 files changed

+67
-67
lines changed

ios/Podfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ SPEC CHECKSUMS:
772772
RNLanguages: 962e562af0d34ab1958d89bcfdb64fafc37c513e
773773
RNPermissions: ad71dd4f767ec254f2cd57592fbee02afee75467
774774
RNReactNativeHapticFeedback: 2566b468cc8d0e7bb2f84b23adc0f4614594d071
775-
RNReanimated: 06a228c5a245ef7b5b03f0efc29d76ce4db9031c
775+
RNReanimated: d0db0ee059c33381bca787a2193c27e52750ccaf
776776
RNShare: d82e10f6b7677f4b0048c23709bd04098d5aee6c
777777
RNStaticSafeAreaInsets: 055ddbf5e476321720457cdaeec0ff2ba40ec1b8
778778
RNSVG: 80584470ff1ffc7994923ea135a3e5ad825546b9

src/quo2/components/wallet/keypair/style.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
(:require [quo2.foundations.colors :as colors]))
33

44
(defn container
5-
[selected? blur? customization-color theme]
5+
[{:keys [blur? customization-color theme selected?]}]
66
{:flex 1
77
:border-radius 20
88
:border-width 1

src/quo2/components/wallet/keypair/view.cljs

+65-65
Original file line numberDiff line numberDiff line change
@@ -25,78 +25,78 @@
2525
(if (= stored :on-device) (i18n/label :t/on-device) (i18n/label :t/on-keycard))))
2626

2727
(defn avatar
28-
[type full-name customization-color]
29-
(if (= type :default-keypair)
30-
[user-avatar/user-avatar
31-
{:full-name full-name
32-
:ring? true
33-
:size :small
34-
:customization-color customization-color}]
35-
[icon-avatar/icon-avatar
36-
{:size :size/s-32
37-
:icon :i/placeholder
38-
:border? true}]))
28+
[{:keys [type details customization-color]}]
29+
(let [{:keys [full-name]} details]
30+
(if (= type :default-keypair)
31+
[user-avatar/user-avatar
32+
{:full-name full-name
33+
:ring? true
34+
:size :small
35+
:customization-color customization-color}]
36+
[icon-avatar/icon-avatar
37+
{:size :size/s-32
38+
:icon :i/placeholder
39+
:border? true}])))
3940

4041
(defn title-view
41-
[full-name action selected? type blur? customization-color on-options-press theme]
42-
[rn/view
43-
{:style style/title-container
44-
:accessibility-label :title}
45-
[text/text {:weight :semi-bold}
46-
(if (= type :default-keypair) (keypair-string full-name) full-name)]
47-
(if (= action :selector)
48-
[selectors/radio
49-
{:checked? selected?
50-
:blur? blur?
51-
:customization-color customization-color}]
52-
[rn/pressable {:on-press on-options-press}
53-
[icon/icon :i/options
54-
{:color (if blur?
55-
colors/white-opa-70
56-
(colors/theme-colors colors/neutral-50 colors/neutral-40 theme))
57-
:accessibility-label :options-button}]])])
42+
[{:keys [details action selected? type blur? customization-color on-options-press theme]}]
43+
(let [{:keys [full-name]} details]
44+
[rn/view
45+
{:style style/title-container
46+
:accessibility-label :title}
47+
[text/text {:weight :semi-bold}
48+
(if (= type :default-keypair) (keypair-string full-name) full-name)]
49+
(if (= action :selector)
50+
[selectors/radio
51+
{:checked? selected?
52+
:blur? blur?
53+
:customization-color customization-color}]
54+
[rn/pressable {:on-press on-options-press}
55+
[icon/icon :i/options
56+
{:color (if blur?
57+
colors/white-opa-70
58+
(colors/theme-colors colors/neutral-50 colors/neutral-40 theme))
59+
:accessibility-label :options-button}]])]))
5860

5961
(defn details-view
60-
[address stored blur? theme]
61-
[rn/view
62-
{:style {:flex-direction :row
63-
:align-items :center}}
64-
[text/text
65-
{:size :paragraph-2
66-
:accessibility-label :details
67-
:style {:color (if blur?
68-
colors/white-opa-40
69-
(colors/theme-colors colors/neutral-50 colors/neutral-40 theme))}}
70-
(details-string address stored)]
71-
(when (= stored :on-keycard)
72-
[rn/view {:style {:margin-left 4}}
73-
[icon/icon :i/keycard-card
74-
{:size 16
75-
:color (if blur?
76-
colors/white-opa-40
77-
(colors/theme-colors colors/neutral-50 colors/neutral-40))}]])])
62+
[details stored blur? theme]
63+
(let [{:keys [address]} details]
64+
[rn/view
65+
{:style {:flex-direction :row
66+
:align-items :center}}
67+
[text/text
68+
{:size :paragraph-2
69+
:accessibility-label :details
70+
:style {:color (if blur?
71+
colors/white-opa-40
72+
(colors/theme-colors colors/neutral-50 colors/neutral-40 theme))}}
73+
(details-string address stored)]
74+
(when (= stored :on-keycard)
75+
[rn/view {:style {:margin-left 4}}
76+
[icon/icon :i/keycard-card
77+
{:size 16
78+
:color (if blur?
79+
colors/white-opa-40
80+
(colors/theme-colors colors/neutral-50 colors/neutral-40))}]])]))
7881

7982
(defn- view-internal
8083
[]
8184
(let [selected? (reagent/atom true)]
82-
(fn [{:keys [theme accounts customization-color type details stored action blur? on-options-press]}]
83-
(let [{:keys [address full-name]} details]
84-
[rn/pressable
85-
{:style (style/container @selected? blur? customization-color theme)
86-
:on-press #(when (= action :selector) (reset! selected? (not @selected?)))}
87-
[rn/view {:style style/header-container}
88-
[avatar type full-name customization-color]
89-
[rn/view
90-
{:style {:margin-left 8
91-
:flex 1}}
92-
[title-view full-name action @selected? type blur? customization-color on-options-press theme]
93-
[details-view address stored blur? theme]]]
94-
[rn/flat-list
95-
{:data accounts
96-
:render-fn account-list-card/view
97-
:separator [rn/view {:style {:height 8}}]
98-
:style {:padding-horizontal 8}}]]))))
85+
(fn [{:keys [accounts action] :as props}]
86+
[rn/pressable
87+
{:style (style/container (merge props {:selected? @selected?}))
88+
:on-press #(when (= action :selector) (reset! selected? (not @selected?)))}
89+
[rn/view {:style style/header-container}
90+
[avatar props]
91+
[rn/view
92+
{:style {:margin-left 8
93+
:flex 1}}
94+
[title-view (merge props {:selected? @selected?})]
95+
[details-view props]]]
96+
[rn/flat-list
97+
{:data accounts
98+
:render-fn account-list-card/view
99+
:separator [rn/view {:style {:height 8}}]
100+
:style {:padding-horizontal 8}}]])))
99101

100102
(def view (quo.theme/with-theme view-internal))
101-
102-
;; todo: mapize, fix dot

0 commit comments

Comments
 (0)