mirror of
https://github.com/status-im/status-react.git
synced 2025-02-27 18:10:49 +00:00
tweak: test sharing a state-sub
This commit is contained in:
parent
c3a62f080b
commit
541e51b37b
@ -148,11 +148,12 @@
|
|||||||
on-message-change (rn/use-callback #(do
|
on-message-change (rn/use-callback #(do
|
||||||
(rf/dispatch-sync [:ui/set-contact-request-message public-key %])
|
(rf/dispatch-sync [:ui/set-contact-request-message public-key %])
|
||||||
(set-message %)))
|
(set-message %)))
|
||||||
bind-sub (use-bind-sub
|
state-sub (combine-subs {:message message-sub
|
||||||
(combine-subs {:message message-sub
|
:public-key (reagent.ratom/cursor
|
||||||
:public-key (reagent.ratom/cursor
|
profile-sub
|
||||||
profile-sub
|
[:public-key])})
|
||||||
[:public-key])}))
|
bind-sub (use-bind-sub state-sub)
|
||||||
|
bind-sub-alt (use-bind-sub state-sub)
|
||||||
bind-state (use-bind-state {:public-key public-key
|
bind-state (use-bind-state {:public-key public-key
|
||||||
:message message})]
|
:message message})]
|
||||||
(rn/use-unmount
|
(rn/use-unmount
|
||||||
@ -197,7 +198,7 @@
|
|||||||
:button-one-props {:disabled? (string/blank? message)
|
:button-one-props {:disabled? (string/blank? message)
|
||||||
:accessibility-label :send-contact-request
|
:accessibility-label :send-contact-request
|
||||||
:customization-color customization-color
|
:customization-color customization-color
|
||||||
:on-press (bind-state on-message-submit)}
|
:on-press (bind-sub-alt on-message-submit)}
|
||||||
:button-one-label "Test Button One"
|
:button-one-label "Test Button One"
|
||||||
:button-two-props {:accessibility-label :test-button
|
:button-two-props {:accessibility-label :test-button
|
||||||
:customization-color :danger
|
:customization-color :danger
|
||||||
|
Loading…
x
Reference in New Issue
Block a user