chore(wallet): hide share button on scanner pages except universal scanner
This commit is contained in:
parent
32123d2f69
commit
ed88170c5d
|
@ -20,7 +20,7 @@
|
|||
(defonce camera-permission-granted? (reagent/atom false))
|
||||
|
||||
(defn- header
|
||||
[{:keys [title subtitle]}]
|
||||
[{:keys [title subtitle share-button?]}]
|
||||
[:<>
|
||||
[rn/view {:style style/header-container}
|
||||
[quo/button
|
||||
|
@ -31,6 +31,7 @@
|
|||
:accessibility-label :close-scan-qr-code
|
||||
:on-press #(rf/dispatch [:navigate-back])}
|
||||
:i/close]
|
||||
(when share-button?
|
||||
[quo/button
|
||||
{:icon-only? true
|
||||
:type :grey
|
||||
|
@ -40,7 +41,7 @@
|
|||
:on-press (fn []
|
||||
(rf/dispatch [:navigate-back])
|
||||
(rf/dispatch [:open-modal :screen/share-shell]))}
|
||||
:i/qr-code]]
|
||||
:i/qr-code])]
|
||||
[quo/text
|
||||
{:size :heading-1
|
||||
:weight :semi-bold
|
||||
|
@ -195,7 +196,7 @@
|
|||
true)
|
||||
|
||||
(defn view
|
||||
[{:keys [title subtitle validate-fn on-success-scan error-message]}]
|
||||
[{:keys [title subtitle validate-fn on-success-scan error-message share-button?]}]
|
||||
(let [insets (safe-area/get-insets)
|
||||
qr-code-succeed? (reagent/atom false)
|
||||
qr-view-finder (reagent/atom {})
|
||||
|
@ -238,7 +239,8 @@
|
|||
[rn/view {:style (style/root-container (:top insets))}
|
||||
[header
|
||||
{:title title
|
||||
:subtitle subtitle}]
|
||||
:subtitle subtitle
|
||||
:share-button? share-button?}]
|
||||
(when (empty? @qr-view-finder)
|
||||
[:<>
|
||||
[rn/view {:style style/scan-qr-code-container}]
|
||||
|
|
|
@ -118,6 +118,7 @@
|
|||
(rn/dismiss-keyboard!))
|
||||
[scan-qr-code/view
|
||||
{:title (i18n/label :t/scan-qr)
|
||||
:share-button? true
|
||||
:on-success-scan on-qr-code-scanned}]]))
|
||||
|
||||
(defn view
|
||||
|
|
Loading…
Reference in New Issue