File tree 2 files changed +10
-7
lines changed
src/status_im/contexts/profile/contact
2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 3
3
[quo.core :as quo]
4
4
[react-native.core :as rn]
5
5
[status-im.contexts.profile.contact.contact-request.style :as style]
6
+ [status-im.contexts.profile.utils :as profile.utils]
6
7
[utils.i18n :as i18n]
7
8
[utils.re-frame :as rf]))
8
9
9
10
(defn view
10
- [{:keys [full-name profile-picture customization-color public-key]}]
11
- (let [[message set-message] (rn/use-state " " )
11
+ []
12
+ (let [{:keys [public-key customization-color]
13
+ :as profile} (rf/sub [:contacts/current-contact ])
14
+ ; ; TODO: remove :blue when #18733 merged.
15
+ customization-color (or customization-color :blue )
16
+ full-name (profile.utils/displayed-name profile)
17
+ profile-picture (profile.utils/photo profile)
18
+ [message set-message] (rn/use-state " " )
12
19
on-message-change (rn/use-callback #(set-message %))
13
20
on-message-submit (rn/use-callback (fn []
14
21
(rf/dispatch [:hide-bottom-sheet ])
Original file line number Diff line number Diff line change 38
38
[rn/view {:style style/button-wrapper}
39
39
[quo/button
40
40
{:on-press #(rf/dispatch [:show-bottom-sheet
41
- {:content (fn [] [contact-request/view
42
- {:customization-color customization-color
43
- :profile-picture profile-picture
44
- :full-name full-name
45
- :public-key public-key}])}])
41
+ {:content (fn [] [contact-request/view])}])
46
42
:icon-left :i/add-user }
47
43
(i18n/label :t/send-contact-request )]]]))
You can’t perform that action at this time.
0 commit comments