[Fix] Error on opening "How to scan" bottom sheet (#16033)
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
This commit is contained in:
parent
2d1b37ab7b
commit
abcfaef1a1
|
@ -44,7 +44,7 @@
|
||||||
(let [text-params {:weight :medium
|
(let [text-params {:weight :medium
|
||||||
:size :paragraph-2
|
:size :paragraph-2
|
||||||
:style (assoc text-style :justify-content :center)}
|
:style (assoc text-style :justify-content :center)}
|
||||||
empty-photo? (empty? photo)
|
empty-photo? (nil? photo)
|
||||||
avatar-size :xxs
|
avatar-size :xxs
|
||||||
avatar-outer-size (get-in user-avatar-style/sizes [avatar-size :outer])]
|
avatar-outer-size (get-in user-avatar-style/sizes [avatar-size :outer])]
|
||||||
[rn/view {:flex-direction :row}
|
[rn/view {:flex-direction :row}
|
||||||
|
|
|
@ -15,10 +15,10 @@
|
||||||
:right 0}))
|
:right 0}))
|
||||||
|
|
||||||
(defn main-view
|
(defn main-view
|
||||||
[translate-y]
|
[translate-y override-theme]
|
||||||
(reanimated/apply-animations-to-style
|
(reanimated/apply-animations-to-style
|
||||||
{:transform [{:translate-y translate-y}]}
|
{:transform [{:translate-y translate-y}]}
|
||||||
{:background-color (colors/theme-colors colors/white colors/neutral-95)
|
{:background-color (colors/theme-colors colors/white colors/neutral-95 override-theme)
|
||||||
:border-top-left-radius 20
|
:border-top-left-radius 20
|
||||||
:border-top-right-radius 20
|
:border-top-right-radius 20
|
||||||
:flex 1
|
:flex 1
|
||||||
|
@ -36,8 +36,8 @@
|
||||||
:align-items :center})
|
:align-items :center})
|
||||||
|
|
||||||
(defn handle
|
(defn handle
|
||||||
[]
|
[override-theme]
|
||||||
{:width 32
|
{:width 32
|
||||||
:height 4
|
:height 4
|
||||||
:border-radius 100
|
:border-radius 100
|
||||||
:background-color (colors/theme-colors colors/neutral-100-opa-30 colors/white-opa-30)})
|
:background-color (colors/theme-colors colors/neutral-100-opa-30 colors/white-opa-30 override-theme)})
|
||||||
|
|
|
@ -45,8 +45,9 @@
|
||||||
|
|
||||||
(defn f-view
|
(defn f-view
|
||||||
[content skip-background?]
|
[content skip-background?]
|
||||||
(let [scroll-enabled (reagent/atom true)
|
(let [scroll-enabled (reagent/atom true)
|
||||||
curr-scroll (atom 0)]
|
curr-scroll (atom 0)
|
||||||
|
{:keys [override-theme]} (rf/sub [:get-screen-params])]
|
||||||
(fn []
|
(fn []
|
||||||
(let [insets (safe-area/get-insets)
|
(let [insets (safe-area/get-insets)
|
||||||
{:keys [height]} (rn/get-window)
|
{:keys [height]} (rn/get-window)
|
||||||
|
@ -70,9 +71,9 @@
|
||||||
[reanimated/view {:style (style/background opacity)}])
|
[reanimated/view {:style (style/background opacity)}])
|
||||||
[gesture/gesture-detector
|
[gesture/gesture-detector
|
||||||
{:gesture (drag-gesture translate-y opacity scroll-enabled curr-scroll close)}
|
{:gesture (drag-gesture translate-y opacity scroll-enabled curr-scroll close)}
|
||||||
[reanimated/view {:style (style/main-view translate-y)}
|
[reanimated/view {:style (style/main-view translate-y override-theme)}
|
||||||
[rn/view {:style style/handle-container}
|
[rn/view {:style style/handle-container}
|
||||||
[rn/view {:style (style/handle)}]]
|
[rn/view {:style (style/handle override-theme)}]]
|
||||||
[content
|
[content
|
||||||
{:insets insets
|
{:insets insets
|
||||||
:close close
|
:close close
|
||||||
|
|
|
@ -49,7 +49,8 @@
|
||||||
(i18n/label (:label value))]))
|
(i18n/label (:label value))]))
|
||||||
|
|
||||||
(defn render-item
|
(defn render-item
|
||||||
[i item]
|
[i list-item]
|
||||||
|
^{:key i}
|
||||||
[rn/view
|
[rn/view
|
||||||
{:margin-vertical 6
|
{:margin-vertical 6
|
||||||
:style style/numbered-list-item}
|
:style style/numbered-list-item}
|
||||||
|
@ -60,7 +61,10 @@
|
||||||
{:size :label
|
{:size :label
|
||||||
:weight :medium
|
:weight :medium
|
||||||
:style style/list-icon-text} i]]
|
:style style/list-icon-text} i]]
|
||||||
(map #(render-element %) item)])
|
(map-indexed (fn [idx item]
|
||||||
|
^{:key idx}
|
||||||
|
[render-element item])
|
||||||
|
list-item)])
|
||||||
|
|
||||||
(defn render-list
|
(defn render-list
|
||||||
[{:keys [title image list]}]
|
[{:keys [title image list]}]
|
||||||
|
|
|
@ -31,7 +31,8 @@
|
||||||
:label (i18n/label :t/how-to-scan)
|
:label (i18n/label :t/how-to-scan)
|
||||||
:icon :i/info
|
:icon :i/info
|
||||||
:icon-override-theme :dark
|
:icon-override-theme :dark
|
||||||
:on-press #(rf/dispatch [:open-modal :how-to-pair])}]}]])
|
:on-press #(rf/dispatch [:open-modal :how-to-pair
|
||||||
|
{:override-theme :dark}])}]}]])
|
||||||
|
|
||||||
(defn f-use-interval
|
(defn f-use-interval
|
||||||
[clock cleanup-clock delay]
|
[clock cleanup-clock delay]
|
||||||
|
|
Loading…
Reference in New Issue