* tweak: implement the share button inside the profile settings page * chore: define event and effect handler for opening share sheet * tidy: refactor share buttons to use open-share event * tidy: refactor open-share effect to use react-native-share bindings * tidy: remove unused code for old bindings to react share sheet * tidy: move effects.share/open definition to navigation effects * tweak: ensure navigation effects are loaded * tidy: use open-share dispatch in ui * tidy: use open-share dispatch instead of calling open function directly * tidy: refactor react-native.share/open to only receive options and return promise * tidy: refactor open-share effect to receive map of content and handlers * tidy: replace strings with keywords * tweak: always handle failure case when opening share-sheet * tweak: rename :content to :options * fix: conditionally call on-error * tweak: add extra information when logging error from attempting to share-sheet
9 lines
183 B
Clojure
9 lines
183 B
Clojure
(ns react-native.share
|
|
(:require
|
|
["react-native-share" :default react-native-share]))
|
|
|
|
(defn open
|
|
([options]
|
|
(-> ^js react-native-share
|
|
(.open (clj->js options)))))
|