parent
eedf38895d
commit
c4d3436bfc
|
@ -1 +1,4 @@
|
||||||
(ns cljsjs.react)
|
(ns cljsjs.react)
|
||||||
|
|
||||||
|
(when (exists? js/window)
|
||||||
|
(set! js/window.React (js/require "react-native")))
|
||||||
|
|
|
@ -2,13 +2,14 @@
|
||||||
(:require [clojure.string :as s]
|
(:require [clojure.string :as s]
|
||||||
[re-frame.core :refer [subscribe dispatch dispatch-sync]]
|
[re-frame.core :refer [subscribe dispatch dispatch-sync]]
|
||||||
[reagent.core :as r]
|
[reagent.core :as r]
|
||||||
[status-im.components.react :as re :refer [view
|
[status-im.components.react :refer [react
|
||||||
text
|
view
|
||||||
image
|
text
|
||||||
navigator
|
image
|
||||||
toolbar-android
|
navigator
|
||||||
drawer-layout-android
|
toolbar-android
|
||||||
touchable-opacity]]
|
drawer-layout-android
|
||||||
|
touchable-opacity]]
|
||||||
[status-im.resources :as res]
|
[status-im.resources :as res]
|
||||||
[status-im.components.drawer.styles :as st]
|
[status-im.components.drawer.styles :as st]
|
||||||
[status-im.i18n :refer [label]]))
|
[status-im.i18n :refer [label]]))
|
||||||
|
@ -71,7 +72,7 @@
|
||||||
|
|
||||||
(defn drawer-view [items]
|
(defn drawer-view [items]
|
||||||
[drawer-layout-android {:drawerWidth 260
|
[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])
|
:render-navigation-view #(r/as-element [drawer-menu])
|
||||||
:ref (fn [drawer]
|
:ref (fn [drawer]
|
||||||
(reset! drawer-atom drawer))}
|
(reset! drawer-atom drawer))}
|
||||||
|
|
|
@ -3,9 +3,6 @@
|
||||||
[status-im.components.styles :as st]
|
[status-im.components.styles :as st]
|
||||||
[status-im.utils.utils :as u]))
|
[status-im.utils.utils :as u]))
|
||||||
|
|
||||||
(when (exists? js/window)
|
|
||||||
(set! js/window.React (js/require "react-native")))
|
|
||||||
|
|
||||||
(def react (u/require "react-native"))
|
(def react (u/require "react-native"))
|
||||||
|
|
||||||
(defn get-react-property [name]
|
(defn get-react-property [name]
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
(:require-macros [status-im.utils.views :refer [defview]])
|
(:require-macros [status-im.utils.views :refer [defview]])
|
||||||
(:require [re-frame.core :refer [subscribe dispatch]]
|
(:require [re-frame.core :refer [subscribe dispatch]]
|
||||||
[status-im.components.react :refer [view
|
[status-im.components.react :refer [view
|
||||||
text
|
text
|
||||||
image
|
image
|
||||||
icon
|
icon
|
||||||
scroll-view
|
scroll-view
|
||||||
touchable-highlight
|
touchable-highlight
|
||||||
touchable-opacity]]
|
touchable-opacity]]
|
||||||
[status-im.components.chat-icon.screen :refer [profile-icon
|
[status-im.components.chat-icon.screen :refer [profile-icon
|
||||||
my-profile-icon]]
|
my-profile-icon]]
|
||||||
[status-im.profile.styles :as st]
|
[status-im.profile.styles :as st]
|
||||||
[status-im.i18n :refer [label]]))
|
[status-im.i18n :refer [label]]))
|
||||||
|
|
||||||
|
@ -60,11 +60,11 @@
|
||||||
[text {:style st/report-user-text} (label :t/report-user)]]]]])
|
[text {:style st/report-user-text} (label :t/report-user)]]]]])
|
||||||
|
|
||||||
(defview my-profile []
|
(defview my-profile []
|
||||||
[username [:get :username]
|
[username [:get :username]
|
||||||
photo-path [:get :photo-path]
|
photo-path [:get :photo-path]
|
||||||
phone-number [:get :phone-number]
|
phone-number [:get :phone-number]
|
||||||
email [:get :email]
|
email [:get :email]
|
||||||
status [:get :status]]
|
status [:get :status]]
|
||||||
[scroll-view {:style st/profile}
|
[scroll-view {:style st/profile}
|
||||||
[touchable-highlight {:style st/back-btn-touchable
|
[touchable-highlight {:style st/back-btn-touchable
|
||||||
:on-press #(dispatch [:navigate-back])}
|
:on-press #(dispatch [:navigate-back])}
|
||||||
|
|
Loading…
Reference in New Issue