From 61ea8f2963bbdd30b1f5cfee8881c4afa362fdd5 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Tue, 9 May 2017 19:17:58 +0000 Subject: [PATCH] Started moving components to own file --- ReactNativeClient/android/gradlew | 0 ReactNativeClient/index.android.js | 37 +++---------------- ReactNativeClient/package.json | 2 +- .../src/components/login-button.js | 29 +++++++++++++++ ReactNativeClient/src/locale.js | 7 ++++ .../src/{model => models}/session.js | 0 .../{service => services}/session-service.js | 0 7 files changed, 42 insertions(+), 33 deletions(-) mode change 100644 => 100755 ReactNativeClient/android/gradlew create mode 100644 ReactNativeClient/src/components/login-button.js create mode 100644 ReactNativeClient/src/locale.js rename ReactNativeClient/src/{model => models}/session.js (100%) rename ReactNativeClient/src/{service => services}/session-service.js (100%) 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 dd82bba19..45eefe304 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