diff --git a/src/cljsjs/react.cljs b/src/cljsjs/react.cljs index aac9de2f4b..582c4c83e0 100644 --- a/src/cljsjs/react.cljs +++ b/src/cljsjs/react.cljs @@ -1 +1,4 @@ -(ns cljsjs.react) \ No newline at end of file +(ns cljsjs.react) + +(when (exists? js/window) + (set! js/window.React (js/require "react-native"))) diff --git a/src/status_im/components/drawer/view.cljs b/src/status_im/components/drawer/view.cljs index 61b7d698b6..a98fb9d542 100644 --- a/src/status_im/components/drawer/view.cljs +++ b/src/status_im/components/drawer/view.cljs @@ -2,13 +2,14 @@ (:require [clojure.string :as s] [re-frame.core :refer [subscribe dispatch dispatch-sync]] [reagent.core :as r] - [status-im.components.react :as re :refer [view - text - image - navigator - toolbar-android - drawer-layout-android - touchable-opacity]] + [status-im.components.react :refer [react + view + text + image + navigator + toolbar-android + drawer-layout-android + touchable-opacity]] [status-im.resources :as res] [status-im.components.drawer.styles :as st] [status-im.i18n :refer [label]])) @@ -71,7 +72,7 @@ (defn drawer-view [items] [drawer-layout-android {:drawerWidth 260 - :drawerPosition re/react.DrawerLayoutAndroild.positions.Left + :drawerPosition js/React.DrawerLayoutAndroid.positions.Left :render-navigation-view #(r/as-element [drawer-menu]) :ref (fn [drawer] (reset! drawer-atom drawer))} diff --git a/src/status_im/components/react.cljs b/src/status_im/components/react.cljs index 5daccaee88..0ab2d2b755 100644 --- a/src/status_im/components/react.cljs +++ b/src/status_im/components/react.cljs @@ -3,9 +3,6 @@ [status-im.components.styles :as st] [status-im.utils.utils :as u])) -(when (exists? js/window) - (set! js/window.React (js/require "react-native"))) - (def react (u/require "react-native")) (defn get-react-property [name] diff --git a/src/status_im/profile/screen.cljs b/src/status_im/profile/screen.cljs index f2de5dcb41..bb0c52a1d8 100644 --- a/src/status_im/profile/screen.cljs +++ b/src/status_im/profile/screen.cljs @@ -2,14 +2,14 @@ (:require-macros [status-im.utils.views :refer [defview]]) (:require [re-frame.core :refer [subscribe dispatch]] [status-im.components.react :refer [view - text - image - icon - scroll-view - touchable-highlight - touchable-opacity]] + text + image + icon + scroll-view + touchable-highlight + touchable-opacity]] [status-im.components.chat-icon.screen :refer [profile-icon - my-profile-icon]] + my-profile-icon]] [status-im.profile.styles :as st] [status-im.i18n :refer [label]])) @@ -60,11 +60,11 @@ [text {:style st/report-user-text} (label :t/report-user)]]]]]) (defview my-profile [] - [username [:get :username] - photo-path [:get :photo-path] + [username [:get :username] + photo-path [:get :photo-path] phone-number [:get :phone-number] - email [:get :email] - status [:get :status]] + email [:get :email] + status [:get :status]] [scroll-view {:style st/profile} [touchable-highlight {:style st/back-btn-touchable :on-press #(dispatch [:navigate-back])}