Skip to content

Commit 0560f79

Browse files
committed
Lint fix
1 parent 0bd6156 commit 0560f79

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

src/react_native/fast_image.cljs

+16-14
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
(ns react-native.fast-image
22
(:require
3-
["react-native-fast-image" :as FastImage]
4-
[clojure.string :as string]
5-
[oops.core :as oops]
6-
[react-native.core :as rn]
7-
[reagent.core :as reagent]))
3+
["react-native-fast-image" :as FastImage]
4+
[clojure.string :as string]
5+
[oops.core :as oops]
6+
[react-native.core :as rn]
7+
[reagent.core :as reagent]))
88

99
(defn- build-source
1010
[source]
@@ -21,10 +21,11 @@
2121

2222
(defn- placeholder
2323
[{:keys [style fallback-content error? loaded?]}]
24-
[rn/view {:style (assoc style
25-
:flex 1
26-
:justify-content :center
27-
:align-items :center)}
24+
[rn/view
25+
{:style (assoc style
26+
:flex 1
27+
:justify-content :center
28+
:align-items :center)}
2829
(cond
2930
(and error? fallback-content) fallback-content
3031
error? [rn/text "X"]
@@ -45,17 +46,18 @@
4546
(fn [{:keys [source fallback-content on-error on-load] :as props}]
4647
[:> FastImage
4748
(assoc props
48-
:source (build-source source)
49-
:on-error #(on-image-error % on-error)
50-
:on-load #(on-image-loaded % on-load))
49+
:source (build-source source)
50+
:on-error #(on-image-error % on-error)
51+
:on-load #(on-image-loaded % on-load))
5152
(when (or @error? (not @loaded?))
5253
[placeholder
5354
{:style (js->clj (:style props))
5455
:fallback-content fallback-content
5556
:error? @error?
5657
:loaded? @loaded?}])])))
5758

58-
(defn- compare-sources [old-props new-props]
59+
(defn- compare-sources
60+
[old-props new-props]
5961
(let [old-source (oops/oget old-props :source)
6062
new-source (oops/oget new-props :source)]
6163
(and old-source
@@ -66,4 +68,4 @@
6668
(-> internal-fast-image
6769
(reagent/reactify-component)
6870
(rn/memo compare-sources)
69-
(reagent/adapt-react-class)))
71+
(reagent/adapt-react-class)))

0 commit comments

Comments
 (0)