diff --git a/ReactNativeClient/android/gradlew b/ReactNativeClient/android/gradlew
old mode 100644
new mode 100755
diff --git a/ReactNativeClient/index.android.js b/ReactNativeClient/index.android.js
index dd82bba193..45eefe3049 100644
--- a/ReactNativeClient/index.android.js
+++ b/ReactNativeClient/index.android.js
@@ -9,10 +9,12 @@ import { WebApi } from 'src/web-api.js'
import { Database } from 'src/database.js'
//import { Session } from 'src/model/session.js';
-import { SessionService } from 'src/service/session-service.js';
+import { SessionService } from 'src/services/session-service.js';
import { Log } from 'src/log.js'
+import { LoginButton } from 'src/components/login-button.js';
+
let debugMode = true;
let clientId = 'A7D301DA7D301DA7D301DA7D301DA7D3';
@@ -24,7 +26,7 @@ db.open();
let defaultState = {
- 'myButtonLabel': 'clicko123456',
+ 'myButtonLabel': 'click',
'counter': 0,
}
@@ -54,16 +56,6 @@ function reducer(state, action) {
return state;
}
-class MyButton extends Component {
-
- render() {
- var label = this.props.label;
- if (label === undefined) label = '';
- return
- }
-
-}
-
class MyInput extends Component {
render() {
@@ -72,25 +64,6 @@ class MyInput extends Component {
}
-const mapStateToButtonProps = function(state) {
- return { label: state.myButtonLabel };
-}
-
-const mapDispatchToButtonProps = function(dispatch) {
- return {
- onPress: function() {
- dispatch({
- type: 'INC_COUNTER'
- });
- }
- }
-}
-
-const MyConnectedButton = connect(
- mapStateToButtonProps,
- mapDispatchToButtonProps
-)(MyButton)
-
const mapStateToInputProps = function(state) {
return {}
}
@@ -117,8 +90,8 @@ class App extends Component {
return (
-
+
)
diff --git a/ReactNativeClient/package.json b/ReactNativeClient/package.json
index 1db83dc6a5..c4789ef17f 100644
--- a/ReactNativeClient/package.json
+++ b/ReactNativeClient/package.json
@@ -18,7 +18,7 @@
"redux": "3.6.0",
"react-redux": "4.4.8",
"query-string": "4.3.4",
- "react-native-sqlite-storage": "3.3.*"
+ "react-native-sqlite-storage": "3.3.*",
},
"jest": {
"preset": "react-native"
diff --git a/ReactNativeClient/src/components/login-button.js b/ReactNativeClient/src/components/login-button.js
new file mode 100644
index 0000000000..d0d612a0e9
--- /dev/null
+++ b/ReactNativeClient/src/components/login-button.js
@@ -0,0 +1,29 @@
+import React, { Component } from 'react';
+import { connect } from 'react-redux'
+import { Button } from 'react-native';
+import { _ } from 'src/locale.js';
+
+class LoginButtonComponent extends Component {
+
+ render() {
+ return
+ }
+
+}
+
+const LoginButton = connect(
+ (state) => {
+ return { label: state.myButtonLabel };
+ },
+ (dispatch) => {
+ return {
+ onPress: function() {
+ dispatch({
+ type: 'INC_COUNTER'
+ });
+ }
+ }
+ }
+)(LoginButtonComponent)
+
+export { LoginButton };
\ No newline at end of file
diff --git a/ReactNativeClient/src/locale.js b/ReactNativeClient/src/locale.js
new file mode 100644
index 0000000000..33d3d4e249
--- /dev/null
+++ b/ReactNativeClient/src/locale.js
@@ -0,0 +1,7 @@
+// This function does nothing for now, but later will return
+// a different string depending on the language.
+function _(s) {
+ return s;
+}
+
+export { _ };
\ No newline at end of file
diff --git a/ReactNativeClient/src/model/session.js b/ReactNativeClient/src/models/session.js
similarity index 100%
rename from ReactNativeClient/src/model/session.js
rename to ReactNativeClient/src/models/session.js
diff --git a/ReactNativeClient/src/service/session-service.js b/ReactNativeClient/src/services/session-service.js
similarity index 100%
rename from ReactNativeClient/src/service/session-service.js
rename to ReactNativeClient/src/services/session-service.js