Commit 529ebaf0 by Giang Tran

setup language

parent f66f2670
// Initialize some variables before react-native code would access them
var onmessage=null, self=global;
// Cache Node's original require as __debug__.require
global.__debug__={require: require};
// Prevent leaking process.versions from debugger process to
// worker because pure React Native doesn't do that and some packages as js-md5 rely on this behavior
Object.defineProperty(process, "versions", {
value: undefined
});
// TODO: Replace by url.fileURLToPath method when Node 10 LTS become deprecated
function fileUrlToPath(url) {
if (process.platform === 'win32') {
return url.toString().replace('file:///', '');
} else {
return url.toString().replace('file://', '');
}
}
function getNativeModules() {
var NativeModules;
try {
// This approach is for old RN versions
NativeModules = global.require('NativeModules');
} catch (err) {
// ignore error and try another way for more recent RN versions
try {
var nativeModuleId;
var modules = global.__r.getModules();
var ids = Object.keys(modules);
for (var i = 0; i < ids.length; i++) {
if (modules[ids[i]].verboseName) {
var packagePath = new String(modules[ids[i]].verboseName);
if (packagePath.indexOf('Libraries/BatchedBridge/NativeModules.js') > 0 || packagePath.indexOf('Libraries\\BatchedBridge\\NativeModules.js') > 0) {
nativeModuleId = parseInt(ids[i], 10);
break;
}
}
}
if (nativeModuleId) {
NativeModules = global.__r(nativeModuleId);
}
}
catch (err) {
// suppress errors
}
}
return NativeModules;
}
// Originally, this was made for iOS only
var vscodeHandlers = {
'vscode_reloadApp': function () {
var NativeModules = getNativeModules();
if (NativeModules && NativeModules.DevMenu) {
NativeModules.DevMenu.reload();
}
},
'vscode_showDevMenu': function () {
var NativeModules = getNativeModules();
if (NativeModules && NativeModules.DevMenu) {
NativeModules.DevMenu.show();
}
}
};
process.on("message", function (message) {
if (message.data && vscodeHandlers[message.data.method]) {
vscodeHandlers[message.data.method]();
} else if(onmessage) {
onmessage(message);
}
});
var postMessage = function(message){
process.send(message);
};
if (!self.postMessage) {
self.postMessage = postMessage;
}
var importScripts = (function(){
var fs=require('fs'), vm=require('vm');
return function(scriptUrl){
scriptUrl = fileUrlToPath(scriptUrl);
var scriptCode = fs.readFileSync(scriptUrl, 'utf8');
// Add a 'debugger;' statement to stop code execution
// to wait for the sourcemaps to be processed by the debug adapter
vm.runInThisContext('debugger;' + scriptCode, {filename: scriptUrl});
};
})();
// Worker is ran as nodejs process, so console.trace() writes to stderr and it leads to error in native app
// To avoid this console.trace() is overridden to print stacktrace via console.log()
// Please, see Node JS implementation: https://github.com/nodejs/node/blob/master/lib/internal/console/constructor.js
console.trace = (function() {
return function() {
try {
var err = {
name: 'Trace',
message: require('util').format.apply(null, arguments)
};
// Node uses 10, but usually it's not enough for RN app trace
Error.stackTraceLimit = 30;
Error.captureStackTrace(err, console.trace);
console.log(err.stack);
} catch (e) {
console.error(e);
}
};
})();
// As worker is ran in node, it breaks broadcast-channels package approach of identifying if it’s ran in node:
// https://github.com/pubkey/broadcast-channel/blob/master/src/util.js#L64
// To avoid it if process.toString() is called if will return empty string instead of [object process].
var nativeObjectToString = Object.prototype.toString;
Object.prototype.toString = function() {
if (this === process) {
return '';
} else {
return nativeObjectToString.call(this);
}
};
"use strict";
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
/* global __fbBatchedBridge, self, importScripts, postMessage, onmessage: true */
/* eslint no-unused-vars: 0 */
onmessage = function () {
var visibilityState;
var showVisibilityWarning = function () {
var hasWarned = false;
return function () {
// Wait until `YellowBox` gets initialized before displaying the warning.
if (hasWarned || console.warn.toString().includes('[native code]')) {
return;
}
hasWarned = true;
console.warn('Remote debugger is in a background tab which may cause apps to ' + 'perform slowly. Fix this by foregrounding the tab (or opening it in ' + 'a separate window).');
};
}();
var messageHandlers = {
executeApplicationScript: function (message, sendReply) {
for (var key in message.inject) {
self[key] = JSON.parse(message.inject[key]);
}
var error;
try {
importScripts(message.url);
} catch (err) {
error = err.message;
}
sendReply(null
/* result */
, error);
},
setDebuggerVisibility: function (message) {
visibilityState = message.visibilityState;
}
};
return function (message) {
if (visibilityState === 'hidden') {
showVisibilityWarning();
}
var object = message.data;
var sendReply = function (result, error) {
postMessage({
replyID: object.id,
result: result,
error: error
});
};
var handler = messageHandlers[object.method];
if (handler) {
// Special cased handlers
handler(object, sendReply);
} else {
// Other methods get called on the bridge
var returnValue = [[], [], [], 0];
var error;
try {
if (typeof __fbBatchedBridge === 'object') {
returnValue = __fbBatchedBridge[object.method].apply(null, object.arguments);
} else {
error = 'Failed to call function, __fbBatchedBridge is undefined';
}
} catch (err) {
error = err.message;
} finally {
sendReply(JSON.stringify(returnValue), error);
}
}
};
}();
//# sourceMappingURL=debuggerWorker.js.map
// Notify debugger that we're done with loading
// and started listening for IPC messages
postMessage({workerLoaded:true});
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -4,6 +4,7 @@ import android.app.Application; ...@@ -4,6 +4,7 @@ import android.app.Application;
import android.content.Context; import android.content.Context;
import com.facebook.react.PackageList; import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication; import com.facebook.react.ReactApplication;
import com.reactnativecommunity.netinfo.NetInfoPackage;
import com.zoontek.rnbootsplash.RNBootSplashPackage; import com.zoontek.rnbootsplash.RNBootSplashPackage;
import com.zoontek.rnbootsplash.RNBootSplashPackage; import com.zoontek.rnbootsplash.RNBootSplashPackage;
import com.BV.LinearGradient.LinearGradientPackage; import com.BV.LinearGradient.LinearGradientPackage;
......
rootProject.name = 'Invest' rootProject.name = 'Invest'
include ':@react-native-community_netinfo'
project(':@react-native-community_netinfo').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/netinfo/android')
include ':react-native-bootsplash' include ':react-native-bootsplash'
project(':react-native-bootsplash').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-bootsplash/android') project(':react-native-bootsplash').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-bootsplash/android')
include ':react-native-bootsplash' include ':react-native-bootsplash'
......
...@@ -903,7 +903,7 @@ ...@@ -903,7 +903,7 @@
CODE_SIGN_ENTITLEMENTS = Invest/Invest.entitlements; CODE_SIGN_ENTITLEMENTS = Invest/Invest.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 21; CURRENT_PROJECT_VERSION = 23;
DEVELOPMENT_TEAM = MXZ24GRH48; DEVELOPMENT_TEAM = MXZ24GRH48;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
GCC_PREPROCESSOR_DEFINITIONS = ( GCC_PREPROCESSOR_DEFINITIONS = (
...@@ -936,7 +936,7 @@ ...@@ -936,7 +936,7 @@
CODE_SIGN_ENTITLEMENTS = Invest/Invest.entitlements; CODE_SIGN_ENTITLEMENTS = Invest/Invest.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 21; CURRENT_PROJECT_VERSION = 23;
DEVELOPMENT_TEAM = MXZ24GRH48; DEVELOPMENT_TEAM = MXZ24GRH48;
INFOPLIST_FILE = Invest/Info.plist; INFOPLIST_FILE = Invest/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
......
...@@ -87,6 +87,8 @@ target 'Invest' do ...@@ -87,6 +87,8 @@ target 'Invest' do
pod 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient' pod 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient'
pod 'react-native-netinfo', :path => '../node_modules/@react-native-community/netinfo'
target 'InvestTests' do target 'InvestTests' do
inherit! :complete inherit! :complete
# Pods for testing # Pods for testing
......
...@@ -124,6 +124,15 @@ PODS: ...@@ -124,6 +124,15 @@ PODS:
- GoogleUtilities/Logger - GoogleUtilities/Logger
- GoogleUtilities/UserDefaults (6.7.2): - GoogleUtilities/UserDefaults (6.7.2):
- GoogleUtilities/Logger - GoogleUtilities/Logger
- libwebp (1.2.0):
- libwebp/demux (= 1.2.0)
- libwebp/mux (= 1.2.0)
- libwebp/webp (= 1.2.0)
- libwebp/demux (1.2.0):
- libwebp/webp
- libwebp/mux (1.2.0):
- libwebp/demux
- libwebp/webp (1.2.0)
- nanopb (1.30906.0): - nanopb (1.30906.0):
- nanopb/decode (= 1.30906.0) - nanopb/decode (= 1.30906.0)
- nanopb/encode (= 1.30906.0) - nanopb/encode (= 1.30906.0)
...@@ -298,6 +307,8 @@ PODS: ...@@ -298,6 +307,8 @@ PODS:
- React-cxxreact (= 0.62.2) - React-cxxreact (= 0.62.2)
- React-jsi (= 0.62.2) - React-jsi (= 0.62.2)
- React-jsinspector (0.62.2) - React-jsinspector (0.62.2)
- react-native-netinfo (6.0.0):
- React-Core
- react-native-safe-area-context (3.1.9): - react-native-safe-area-context (3.1.9):
- React-Core - React-Core
- react-native-webview (11.2.5): - react-native-webview (11.2.5):
...@@ -371,6 +382,10 @@ PODS: ...@@ -371,6 +382,10 @@ PODS:
- React-Core - React-Core
- RNCMaskedView (0.1.10): - RNCMaskedView (0.1.10):
- React - React
- RNFastImage (8.3.4):
- React-Core
- SDWebImage (~> 5.8)
- SDWebImageWebPCoder (~> 0.6.1)
- RNFBApp (7.3.1): - RNFBApp (7.3.1):
- Firebase/CoreOnly (~> 6.25.0) - Firebase/CoreOnly (~> 6.25.0)
- React - React
...@@ -380,6 +395,8 @@ PODS: ...@@ -380,6 +395,8 @@ PODS:
- RNFBApp - RNFBApp
- RNGestureHandler (1.10.3): - RNGestureHandler (1.10.3):
- React-Core - React-Core
- RNI18n (2.0.15):
- React
- RNImageCropPicker (0.36.0): - RNImageCropPicker (0.36.0):
- React-Core - React-Core
- React-RCTImage - React-RCTImage
...@@ -395,6 +412,12 @@ PODS: ...@@ -395,6 +412,12 @@ PODS:
- React-Core - React-Core
- RNVectorIcons (8.1.0): - RNVectorIcons (8.1.0):
- React-Core - React-Core
- SDWebImage (5.11.0):
- SDWebImage/Core (= 5.11.0)
- SDWebImage/Core (5.11.0)
- SDWebImageWebPCoder (0.6.1):
- libwebp (~> 1.0)
- SDWebImage/Core (~> 5.7)
- TOCropViewController (2.6.0) - TOCropViewController (2.6.0)
- Yoga (1.14.0) - Yoga (1.14.0)
- YogaKit (1.18.1): - YogaKit (1.18.1):
...@@ -439,6 +462,7 @@ DEPENDENCIES: ...@@ -439,6 +462,7 @@ DEPENDENCIES:
- React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
- React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
- "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)"
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`) - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
- react-native-webview (from `../node_modules/react-native-webview`) - react-native-webview (from `../node_modules/react-native-webview`)
- React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
...@@ -457,9 +481,11 @@ DEPENDENCIES: ...@@ -457,9 +481,11 @@ DEPENDENCIES:
- "RNCCheckbox (from `../node_modules/@react-native-community/checkbox`)" - "RNCCheckbox (from `../node_modules/@react-native-community/checkbox`)"
- "RNCClipboard (from `../node_modules/@react-native-clipboard/clipboard`)" - "RNCClipboard (from `../node_modules/@react-native-clipboard/clipboard`)"
- "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)" - "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)"
- RNFastImage (from `../node_modules/react-native-fast-image`)
- "RNFBApp (from `../node_modules/@react-native-firebase/app`)" - "RNFBApp (from `../node_modules/@react-native-firebase/app`)"
- "RNFBMessaging (from `../node_modules/@react-native-firebase/messaging`)" - "RNFBMessaging (from `../node_modules/@react-native-firebase/messaging`)"
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`) - RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
- RNI18n (from `../node_modules/react-native-i18n`)
- RNImageCropPicker (from `../node_modules/react-native-image-crop-picker`) - RNImageCropPicker (from `../node_modules/react-native-image-crop-picker`)
- RNReanimated (from `../node_modules/react-native-reanimated`) - RNReanimated (from `../node_modules/react-native-reanimated`)
- RNScreens (from `../node_modules/react-native-screens`) - RNScreens (from `../node_modules/react-native-screens`)
...@@ -488,10 +514,13 @@ SPEC REPOS: ...@@ -488,10 +514,13 @@ SPEC REPOS:
- FlipperKit - FlipperKit
- GoogleDataTransport - GoogleDataTransport
- GoogleUtilities - GoogleUtilities
- libwebp
- nanopb - nanopb
- OpenSSL-Universal - OpenSSL-Universal
- PromisesObjC - PromisesObjC
- Protobuf - Protobuf
- SDWebImage
- SDWebImageWebPCoder
- TOCropViewController - TOCropViewController
- YogaKit - YogaKit
- YoutubePlayer-in-WKWebView - YoutubePlayer-in-WKWebView
...@@ -529,6 +558,8 @@ EXTERNAL SOURCES: ...@@ -529,6 +558,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/jsiexecutor" :path: "../node_modules/react-native/ReactCommon/jsiexecutor"
React-jsinspector: React-jsinspector:
:path: "../node_modules/react-native/ReactCommon/jsinspector" :path: "../node_modules/react-native/ReactCommon/jsinspector"
react-native-netinfo:
:path: "../node_modules/@react-native-community/netinfo"
react-native-safe-area-context: react-native-safe-area-context:
:path: "../node_modules/react-native-safe-area-context" :path: "../node_modules/react-native-safe-area-context"
react-native-webview: react-native-webview:
...@@ -563,12 +594,16 @@ EXTERNAL SOURCES: ...@@ -563,12 +594,16 @@ EXTERNAL SOURCES:
:path: "../node_modules/@react-native-clipboard/clipboard" :path: "../node_modules/@react-native-clipboard/clipboard"
RNCMaskedView: RNCMaskedView:
:path: "../node_modules/@react-native-community/masked-view" :path: "../node_modules/@react-native-community/masked-view"
RNFastImage:
:path: "../node_modules/react-native-fast-image"
RNFBApp: RNFBApp:
:path: "../node_modules/@react-native-firebase/app" :path: "../node_modules/@react-native-firebase/app"
RNFBMessaging: RNFBMessaging:
:path: "../node_modules/@react-native-firebase/messaging" :path: "../node_modules/@react-native-firebase/messaging"
RNGestureHandler: RNGestureHandler:
:path: "../node_modules/react-native-gesture-handler" :path: "../node_modules/react-native-gesture-handler"
RNI18n:
:path: "../node_modules/react-native-i18n"
RNImageCropPicker: RNImageCropPicker:
:path: "../node_modules/react-native-image-crop-picker" :path: "../node_modules/react-native-image-crop-picker"
RNReanimated: RNReanimated:
...@@ -607,6 +642,7 @@ SPEC CHECKSUMS: ...@@ -607,6 +642,7 @@ SPEC CHECKSUMS:
glog: 1f3da668190260b06b429bb211bfbee5cd790c28 glog: 1f3da668190260b06b429bb211bfbee5cd790c28
GoogleDataTransport: f56af7caa4ed338dc8e138a5d7c5973e66440833 GoogleDataTransport: f56af7caa4ed338dc8e138a5d7c5973e66440833
GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3 GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3
libwebp: e90b9c01d99205d03b6bb8f2c8c415e5a4ef66f0
nanopb: 59317e09cf1f1a0af72f12af412d54edf52603fc nanopb: 59317e09cf1f1a0af72f12af412d54edf52603fc
OpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b OpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b
PromisesObjC: 3113f7f76903778cf4a0586bd1ab89329a0b7b97 PromisesObjC: 3113f7f76903778cf4a0586bd1ab89329a0b7b97
...@@ -621,6 +657,7 @@ SPEC CHECKSUMS: ...@@ -621,6 +657,7 @@ SPEC CHECKSUMS:
React-jsi: b6dc94a6a12ff98e8877287a0b7620d365201161 React-jsi: b6dc94a6a12ff98e8877287a0b7620d365201161
React-jsiexecutor: 1540d1c01bb493ae3124ed83351b1b6a155db7da React-jsiexecutor: 1540d1c01bb493ae3124ed83351b1b6a155db7da
React-jsinspector: 512e560d0e985d0e8c479a54a4e5c147a9c83493 React-jsinspector: 512e560d0e985d0e8c479a54a4e5c147a9c83493
react-native-netinfo: e849fc21ca2f4128a5726c801a82fc6f4a6db50d
react-native-safe-area-context: b6e0e284002381d2ff29fa4fff42b4d8282e3c94 react-native-safe-area-context: b6e0e284002381d2ff29fa4fff42b4d8282e3c94
react-native-webview: e994346d13f4d8b240347bc5be043a860452e4b6 react-native-webview: e994346d13f4d8b240347bc5be043a860452e4b6
React-RCTActionSheet: f41ea8a811aac770e0cc6e0ad6b270c644ea8b7c React-RCTActionSheet: f41ea8a811aac770e0cc6e0ad6b270c644ea8b7c
...@@ -638,18 +675,22 @@ SPEC CHECKSUMS: ...@@ -638,18 +675,22 @@ SPEC CHECKSUMS:
RNCCheckbox: d1749e6a92178ce5dbc31e63becd1f34f0c76bbd RNCCheckbox: d1749e6a92178ce5dbc31e63becd1f34f0c76bbd
RNCClipboard: 245417a78ab585e0d4d83926c28907e7b2bc24bd RNCClipboard: 245417a78ab585e0d4d83926c28907e7b2bc24bd
RNCMaskedView: 5a8ec07677aa885546a0d98da336457e2bea557f RNCMaskedView: 5a8ec07677aa885546a0d98da336457e2bea557f
RNFastImage: d4870d58f5936111c56218dbd7fcfc18e65b58ff
RNFBApp: cd70a6c061bc485994e28c7d58ab760538850f0e RNFBApp: cd70a6c061bc485994e28c7d58ab760538850f0e
RNFBMessaging: c32b623b46dbbabf19079f801f053be75f428398 RNFBMessaging: c32b623b46dbbabf19079f801f053be75f428398
RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211 RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211
RNI18n: e2f7e76389fcc6e84f2c8733ea89b92502351fd8
RNImageCropPicker: e641bf83ac47324994cac139bde74635ec52c17c RNImageCropPicker: e641bf83ac47324994cac139bde74635ec52c17c
RNReanimated: e03f7425cb7a38dcf1b644d680d1bfc91c3337ad RNReanimated: e03f7425cb7a38dcf1b644d680d1bfc91c3337ad
RNScreens: f0d7a2a440a8ba9f4574ca1ddb3368f473891be4 RNScreens: f0d7a2a440a8ba9f4574ca1ddb3368f473891be4
RNVectorIcons: 31cebfcf94e8cf8686eb5303ae0357da64d7a5a4 RNVectorIcons: 31cebfcf94e8cf8686eb5303ae0357da64d7a5a4
SDWebImage: 7acbb57630ac7db4a495547fb73916ff3e432f6b
SDWebImageWebPCoder: d0dac55073088d24b2ac1b191a71a8f8d0adac21
TOCropViewController: 3105367e808b7d3d886a74ff59bf4804e7d3ab38 TOCropViewController: 3105367e808b7d3d886a74ff59bf4804e7d3ab38
Yoga: 3ebccbdd559724312790e7742142d062476b698e Yoga: 3ebccbdd559724312790e7742142d062476b698e
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
YoutubePlayer-in-WKWebView: cfbf46da51d7370662a695a8f351e5fa1d3e1008 YoutubePlayer-in-WKWebView: cfbf46da51d7370662a695a8f351e5fa1d3e1008
PODFILE CHECKSUM: cc64089dac6461c6a9751457c1e7a22a0aea274d PODFILE CHECKSUM: d813a7a529c04f4ed02dcce2852a84914d3c82d8
COCOAPODS: 1.10.1 COCOAPODS: 1.10.1
...@@ -3,13 +3,14 @@ import {combineReducers} from 'redux'; ...@@ -3,13 +3,14 @@ import {combineReducers} from 'redux';
import ModalLoadingReducer from './ModalLoading'; import ModalLoadingReducer from './ModalLoading';
import SnackReducer from './SnackReducer'; import SnackReducer from './SnackReducer';
import ScreenInitReducer from './ScreenInit'; import ScreenInitReducer from './ScreenInit';
import languageReducer from './languageReducer';
// @ts-ignore // @ts-ignore
const rootReducer = combineReducers({ const rootReducer = combineReducers({
userReducer, userReducer,
ModalLoadingReducer, ModalLoadingReducer,
SnackReducer, SnackReducer,
ScreenInitReducer, ScreenInitReducer,
languageReducer,
}); });
export default rootReducer; export default rootReducer;
import {CHANGE_LANGUAGE} from './../actions/actionTypes';
var initialState = {
language: 'vi',
};
var languageReducer = (state = initialState, action) => {
switch (action.type) {
case CHANGE_LANGUAGE: {
return {language: action.language};
}
default:
return state;
}
};
export default languageReducer;
...@@ -6,17 +6,22 @@ import StackNavigation from './routers/StackNavigation'; ...@@ -6,17 +6,22 @@ import StackNavigation from './routers/StackNavigation';
import Modal from 'react-native-modal'; import Modal from 'react-native-modal';
import {SkypeIndicator} from 'react-native-indicators'; import {SkypeIndicator} from 'react-native-indicators';
import {enableScreens} from 'react-native-screens'; import {enableScreens} from 'react-native-screens';
import NoInternetComponent from './components/NoInternet';
enableScreens(); enableScreens();
const RootView = (props) => { const RootView = (props) => {
return ( return (
<>
<View style={{flex: 1}}> <View style={{flex: 1}}>
<Modal isVisible={props.loadingModal.isVisible}> <Modal isVisible={props.loadingModal.isVisible}>
<SkypeIndicator color={'white'} /> <SkypeIndicator color={'white'} />
</Modal> </Modal>
<StackNavigation /> <StackNavigation />
</View> </View>
<NoInternetComponent />
</>
); );
}; };
......
...@@ -3,6 +3,7 @@ import {View, Text, StyleSheet, Image, TouchableOpacity} from 'react-native'; ...@@ -3,6 +3,7 @@ import {View, Text, StyleSheet, Image, TouchableOpacity} from 'react-native';
import HeaderDrawer from '../../components/Header/HeaderDrawer'; import HeaderDrawer from '../../components/Header/HeaderDrawer';
import {WIDTHXD, HEIGHTXD} from '../../Config/Functions'; import {WIDTHXD, HEIGHTXD} from '../../Config/Functions';
import R from '../../assets/R'; import R from '../../assets/R';
import AppText from '../../components/AppText';
import {useNavigation} from '@react-navigation/native'; import {useNavigation} from '@react-navigation/native';
import { import {
USERINFOR, USERINFOR,
...@@ -19,47 +20,47 @@ const AccountView = (props) => { ...@@ -19,47 +20,47 @@ const AccountView = (props) => {
return ( return (
<View> <View>
<HeaderDrawer title={'Tài khoản'} /> <HeaderDrawer title={'Account'} />
<View style={styles.container}> <View style={styles.container}>
<TouchableOpacity <TouchableOpacity
onPress={() => navigate.navigate(PROFILE)} onPress={() => navigate.navigate(PROFILE)}
style={styles.containerItem}> style={styles.containerItem}>
<Image source={R.images.iconUser} style={styles.imgIcon} /> <Image source={R.images.iconUser} style={styles.imgIcon} />
<Text>Thông tin cá nhân</Text> <AppText i18nKey={'MyProfile'}>Thông tin cá nhân</AppText>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity <TouchableOpacity
onPress={() => navigate.navigate(AccountVerification)} onPress={() => navigate.navigate(AccountVerification)}
style={styles.containerItem}> style={styles.containerItem}>
<Image source={R.images.iconUserAccuracy} style={styles.imgIcon} /> <Image source={R.images.iconUserAccuracy} style={styles.imgIcon} />
<Text>Xác thc tài khon</Text> <AppText i18nKey={'VerifyAccount'}>Xác thc tài khon</AppText>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity <TouchableOpacity
onPress={() => navigate.navigate(PAYMENTS)} onPress={() => navigate.navigate(PAYMENTS)}
style={styles.containerItem}> style={styles.containerItem}>
<Image source={R.images.iconList} style={styles.imgIcon} /> <Image source={R.images.iconList} style={styles.imgIcon} />
<Text>Các khon thanh toán</Text> <AppText i18nKey={'Payments'}>Các khon thanh toán</AppText>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity <TouchableOpacity
onPress={() => navigate.navigate(ROSE)} onPress={() => navigate.navigate(ROSE)}
style={styles.containerItem}> style={styles.containerItem}>
<Image source={R.images.iconRose} style={styles.imgIcon} /> <Image source={R.images.iconRose} style={styles.imgIcon} />
<Text>Hoa hng</Text> <AppText i18nKey={'Rose'}>Hoa hng</AppText>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity <TouchableOpacity
onPress={() => navigate.navigate(BONUSTEAM)} onPress={() => navigate.navigate(BONUSTEAM)}
style={styles.containerItem}> style={styles.containerItem}>
<Image source={R.images.iconWallet} style={styles.imgIcon} /> <Image source={R.images.iconWallet} style={styles.imgIcon} />
<Text>Tin thưởng đội nhóm</Text> <AppText i18nKey={'TeamBonus'}>Tin thưởng đội nhóm</AppText>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity <TouchableOpacity
onPress={() => navigate.navigate(MYGROUP)} onPress={() => navigate.navigate(MYGROUP)}
style={styles.containerItem}> style={styles.containerItem}>
<Image source={R.images.moneyteam} style={styles.imgIcon} /> <Image source={R.images.moneyteam} style={styles.imgIcon} />
<Text>Đối tác ca tôi</Text> <AppText i18nKey={'MyPartner'}>Đối tác ca tôi</AppText>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
</View> </View>
......
...@@ -9,7 +9,7 @@ const Contract = (props) => { ...@@ -9,7 +9,7 @@ const Contract = (props) => {
console.log(props.user); console.log(props.user);
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack isWhite={true} title={'Hợp đồng'} /> <HeaderBack isWhite={true} title={'Contract'} />
<WebView <WebView
androidHardwareAccelerationDisabled={true} androidHardwareAccelerationDisabled={true}
......
...@@ -136,7 +136,7 @@ const PacketCQG = (props) => { ...@@ -136,7 +136,7 @@ const PacketCQG = (props) => {
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack title={'Mở tài khoản CQG'} /> <HeaderBack title={'OpenAccountCQG'} />
<ScrollView showsVerticalScrollIndicator={false}> <ScrollView showsVerticalScrollIndicator={false}>
<View style={styles.container}> <View style={styles.container}>
<Text style={styles.txtNote}> <Text style={styles.txtNote}>
......
...@@ -20,7 +20,7 @@ import {connect} from 'react-redux'; ...@@ -20,7 +20,7 @@ import {connect} from 'react-redux';
const AccountVerificationView = (props) => { const AccountVerificationView = (props) => {
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack isWhite={true} title={'Xác minh tài khoản'} /> <HeaderBack isWhite={true} title={'AccountVerify'} />
<Tab.Navigator <Tab.Navigator
initialRouteName="GeneralInfor" initialRouteName="GeneralInfor"
tabBarOptions={{ tabBarOptions={{
......
...@@ -26,7 +26,7 @@ const MethodPayView = (props) => { ...@@ -26,7 +26,7 @@ const MethodPayView = (props) => {
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack title={'Chọn phương thức thanh toán'} /> <HeaderBack title={'SelectPaymentMethod'} />
<View style={{flex: 1}}> <View style={{flex: 1}}>
<FlatList <FlatList
keyExtractor={(item) => item.id} keyExtractor={(item) => item.id}
......
...@@ -7,7 +7,7 @@ import {WebView} from 'react-native-webview'; ...@@ -7,7 +7,7 @@ import {WebView} from 'react-native-webview';
const DepositView = (props) => { const DepositView = (props) => {
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack isWhite={true} title={'Nạp tiền'} /> <HeaderBack isWhite={true} title={'Deposit'} />
<WebView <WebView
androidHardwareAccelerationDisabled={true} androidHardwareAccelerationDisabled={true}
source={{uri: props.urlCheckout}} source={{uri: props.urlCheckout}}
......
...@@ -7,7 +7,7 @@ import {WebView} from 'react-native-webview'; ...@@ -7,7 +7,7 @@ import {WebView} from 'react-native-webview';
const DetailHistory = (props) => { const DetailHistory = (props) => {
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack isWhite={true} title={'Nạp tiền'} /> <HeaderBack isWhite={true} title={'Deposit'} />
<WebView <WebView
androidHardwareAccelerationDisabled={true} androidHardwareAccelerationDisabled={true}
source={{ source={{
......
...@@ -10,36 +10,36 @@ import { ...@@ -10,36 +10,36 @@ import {
import HeaderBack from '../../../components/Header/HeaderBack'; import HeaderBack from '../../../components/Header/HeaderBack';
import Item from './Item'; import Item from './Item';
import {getFontXD} from '../../../Config/Functions'; import {getFontXD} from '../../../Config/Functions';
import AppText from '../../../components/AppText';
const Fillters = [ const Fillters = [
{ {
id: '1', id: '1',
name: 'Tất cả', name: 'All',
value: 'ALL', value: 'ALL',
}, },
{ {
id: '2', id: '2',
name: 'Nạp tiền', name: 'Deposit',
value: 'DEPOSIT', value: 'DEPOSIT',
}, },
{ {
id: '3', id: '3',
name: 'Rút tiền', name: 'Withdraw',
value: 'WITHDRAW', value: 'WITHDRAW',
}, },
{ {
id: '4', id: '4',
name: 'Chuyển khoản', name: 'Withdraw',
value: 'TRANSFER', value: 'TRANSFER',
}, },
]; ];
const HistoryView = (props) => { const HistoryView = (props) => {
const {isRefresh, onRefresh, onLoadMore, data, selected, setSelected} = props; const {isRefresh, onRefresh, onLoadMore, data, selected, setSelected} = props;
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack isWhite={true} title={'Lịch sử'} /> <HeaderBack isWhite={true} title={'History'} />
<View style={{flex: 1}}> <View style={{flex: 1}}>
<View style={styles.headerContainer}> <View style={styles.headerContainer}>
<ScrollView horizontal showsHorizontalScrollIndicator={false}> <ScrollView horizontal showsHorizontalScrollIndicator={false}>
...@@ -51,13 +51,14 @@ const HistoryView = (props) => { ...@@ -51,13 +51,14 @@ const HistoryView = (props) => {
styles.itemFillter, styles.itemFillter,
selected == e.value ? {borderColor: '#1473E6'} : null, selected == e.value ? {borderColor: '#1473E6'} : null,
]}> ]}>
<Text <AppText
i18nKey={e.name}
style={[ style={[
styles.txtFillter, styles.txtFillter,
selected == e.value ? {color: '#1473E6'} : {}, selected == e.value ? {color: '#1473E6'} : {},
]}> ]}>
{e.name} {e.name}
</Text> </AppText>
</TouchableOpacity> </TouchableOpacity>
))} ))}
</ScrollView> </ScrollView>
...@@ -66,13 +67,14 @@ const HistoryView = (props) => { ...@@ -66,13 +67,14 @@ const HistoryView = (props) => {
{data.length == 0 ? ( {data.length == 0 ? (
<View <View
style={{justifyContent: 'center', alignItems: 'center', flex: 1}}> style={{justifyContent: 'center', alignItems: 'center', flex: 1}}>
<Text <AppText
i18nKey={'NoData'}
style={{ style={{
fontSize: getFontXD(46), fontSize: 18,
fontWeight: 'bold', fontWeight: 'bold',
}}> }}>
Không có giao dch nào! Không có d liu!
</Text> </AppText>
</View> </View>
) : ( ) : (
<FlatList <FlatList
......
...@@ -8,7 +8,7 @@ import {HEIGHTXD} from '../../../Config/Functions'; ...@@ -8,7 +8,7 @@ import {HEIGHTXD} from '../../../Config/Functions';
const TransferView = (props) => { const TransferView = (props) => {
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack title={'Chuyển khoản'} /> <HeaderBack title={'Transfer'} />
<View <View
style={{ style={{
flex: 1, flex: 1,
......
...@@ -3,6 +3,7 @@ import {View, Text, FlatList} from 'react-native'; ...@@ -3,6 +3,7 @@ import {View, Text, FlatList} from 'react-native';
import HeaderBack from '../../../../components/Header/HeaderBack'; import HeaderBack from '../../../../components/Header/HeaderBack';
import Item from './Item'; import Item from './Item';
import {getListTransaction} from '../../../../apis/Functions/Widthdraw'; import {getListTransaction} from '../../../../apis/Functions/Widthdraw';
import AppText from '../../../../components/AppText';
const Success = (props) => { const Success = (props) => {
const [page, setPage] = useState(1); const [page, setPage] = useState(1);
...@@ -69,13 +70,14 @@ const Success = (props) => { ...@@ -69,13 +70,14 @@ const Success = (props) => {
<View style={{flex: 1}}> <View style={{flex: 1}}>
{data.length == 0 ? ( {data.length == 0 ? (
<View style={{justifyContent: 'center', alignItems: 'center', flex: 1}}> <View style={{justifyContent: 'center', alignItems: 'center', flex: 1}}>
<Text <AppText
i18nKey={'NoData'}
style={{ style={{
fontSize: 18, fontSize: 18,
fontWeight: 'bold', fontWeight: 'bold',
}}> }}>
Không có thông báo nào! Không có d liu!
</Text> </AppText>
</View> </View>
) : ( ) : (
<FlatList <FlatList
......
...@@ -4,6 +4,7 @@ import HeaderBack from '../../../../components/Header/HeaderBack'; ...@@ -4,6 +4,7 @@ import HeaderBack from '../../../../components/Header/HeaderBack';
import Item from './Item'; import Item from './Item';
import {getListTransaction} from '../../../../apis/Functions/Widthdraw'; import {getListTransaction} from '../../../../apis/Functions/Widthdraw';
import {useNavigation} from '@react-navigation/native'; import {useNavigation} from '@react-navigation/native';
import AppText from '../../../../components/AppText';
const Watting = (props) => { const Watting = (props) => {
const [page, setPage] = useState(1); const [page, setPage] = useState(1);
const [data, setData] = useState([]); const [data, setData] = useState([]);
...@@ -74,13 +75,14 @@ const Watting = (props) => { ...@@ -74,13 +75,14 @@ const Watting = (props) => {
<View style={{flex: 1}}> <View style={{flex: 1}}>
{data.length == 0 ? ( {data.length == 0 ? (
<View style={{justifyContent: 'center', alignItems: 'center', flex: 1}}> <View style={{justifyContent: 'center', alignItems: 'center', flex: 1}}>
<Text <AppText
i18nKey={'NoData'}
style={{ style={{
fontSize: 18, fontSize: 18,
fontWeight: 'bold', fontWeight: 'bold',
}}> }}>
Không có thông báo nào! Không có d liu!
</Text> </AppText>
</View> </View>
) : ( ) : (
<FlatList <FlatList
......
...@@ -14,7 +14,7 @@ const Wallet = (props) => { ...@@ -14,7 +14,7 @@ const Wallet = (props) => {
const navigate = useNavigation(); const navigate = useNavigation();
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack isWhite={true} title={'Ví tiền'} /> <HeaderBack isWhite={true} title={'Transfer'} />
<View style={{flex: 1, backgroundColor: 'red'}}> <View style={{flex: 1, backgroundColor: 'red'}}>
<Tab.Navigator <Tab.Navigator
......
...@@ -59,7 +59,7 @@ const WalletDeposit = (props) => { ...@@ -59,7 +59,7 @@ const WalletDeposit = (props) => {
}; };
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack title={'Nạp tiền đầu tư'} /> <HeaderBack title={'InvestmentDeposit'} />
<View style={styles.container}> <View style={styles.container}>
<View style={styles.wrapTop}> <View style={styles.wrapTop}>
<View style={styles.itemTop}> <View style={styles.itemTop}>
......
...@@ -116,7 +116,7 @@ const WalletWithdraw = (props) => { ...@@ -116,7 +116,7 @@ const WalletWithdraw = (props) => {
keyboardVerticalOffset={-50}> keyboardVerticalOffset={-50}>
<TouchableWithoutFeedback onPress={Keyboard.dismiss}> <TouchableWithoutFeedback onPress={Keyboard.dismiss}>
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack title={'Rút tiền'} /> <HeaderBack title={'Withdraw'} />
<View style={styles.container}> <View style={styles.container}>
<View style={styles.wrapTop}> <View style={styles.wrapTop}>
<View style={styles.itemTop}> <View style={styles.itemTop}>
......
...@@ -26,7 +26,7 @@ const WithdrawView = (props) => { ...@@ -26,7 +26,7 @@ const WithdrawView = (props) => {
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack title={'Chọn phương thức thanh toán'} /> <HeaderBack title={'SelectPaymentMethod'} />
<View style={{flex: 1}}> <View style={{flex: 1}}>
<FlatList <FlatList
keyExtractor={(item) => item.id} keyExtractor={(item) => item.id}
......
...@@ -45,7 +45,7 @@ const ConfirmEmail = (props) => { ...@@ -45,7 +45,7 @@ const ConfirmEmail = (props) => {
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack title={'Quên mật khẩu'} /> <HeaderBack title={'ForgotPassword'} />
<View style={styles.container}> <View style={styles.container}>
<View style={styles.wrap}> <View style={styles.wrap}>
<View style={styles.containerCode}> <View style={styles.containerCode}>
......
...@@ -66,7 +66,7 @@ const ConfirmOTP = (propsa) => { ...@@ -66,7 +66,7 @@ const ConfirmOTP = (propsa) => {
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack title={'Xác thực OTP'} /> <HeaderBack title={'VerifyOTP'} />
<View style={styles.container}> <View style={styles.container}>
<View style={{height: 20}} /> <View style={{height: 20}} />
......
...@@ -59,7 +59,7 @@ const NewPassword = (props) => { ...@@ -59,7 +59,7 @@ const NewPassword = (props) => {
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack title={'Thay đổi mật khẩu mới'} /> <HeaderBack title={'ChangeNewPassword'} />
<View style={styles.container}> <View style={styles.container}>
<View style={styles.wrap}> <View style={styles.wrap}>
......
...@@ -4,26 +4,27 @@ import {View, Text, StyleSheet, FlatList, TouchableOpacity} from 'react-native'; ...@@ -4,26 +4,27 @@ import {View, Text, StyleSheet, FlatList, TouchableOpacity} from 'react-native';
import HeaderSearch from '../../components/Header/HeaderSearch'; import HeaderSearch from '../../components/Header/HeaderSearch';
import {getFontXD} from '../../Config/Functions'; import {getFontXD} from '../../Config/Functions';
import Item from './Item'; import Item from './Item';
import AppText from '../../components/AppText';
const Fillters = [ const Fillters = [
{ {
id: '1', id: '1',
name: 'Tất cả', name: 'All',
value: 'all', value: 'all',
}, },
{ {
id: '2', id: '2',
name: 'Nạp tiền', name: 'Deposit',
value: 'deposit', value: 'deposit',
}, },
{ {
id: '3', id: '3',
name: 'Rút tiền', name: 'Withdraw',
value: 'withdraw', value: 'withdraw',
}, },
{ {
id: '4', id: '4',
name: 'Chuyển khoản', name: 'Withdraw',
value: 'exchange', value: 'exchange',
}, },
]; ];
...@@ -99,13 +100,14 @@ const ExchangeView = (props) => { ...@@ -99,13 +100,14 @@ const ExchangeView = (props) => {
styles.itemFillter, styles.itemFillter,
selected == item.id ? {borderColor: '#1473E6'} : null, selected == item.id ? {borderColor: '#1473E6'} : null,
]}> ]}>
<Text <AppText
i18nKey={e.name}
style={[ style={[
styles.txtFillter, styles.txtFillter,
selected == item.id ? {color: '#1473E6'} : {}, selected == item.id ? {color: '#1473E6'} : {},
]}> ]}>
{item.name} {item.name}
</Text> </AppText>
</TouchableOpacity> </TouchableOpacity>
)} )}
/> />
......
...@@ -62,7 +62,7 @@ const FeedbackView = (props) => { ...@@ -62,7 +62,7 @@ const FeedbackView = (props) => {
keyboardVerticalOffset={-50}> keyboardVerticalOffset={-50}>
<TouchableWithoutFeedback onPress={Keyboard.dismiss}> <TouchableWithoutFeedback onPress={Keyboard.dismiss}>
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack isWhite={true} title={'Gửi phản hồi'} /> <HeaderBack isWhite={true} title={'SendFeedback'} />
<View style={styles.container}> <View style={styles.container}>
<Text style={styles.txt}>Đánh giá dch v ca DCV Invest</Text> <Text style={styles.txt}>Đánh giá dch v ca DCV Invest</Text>
......
...@@ -3,7 +3,7 @@ import {View, Text, StyleSheet, Image} from 'react-native'; ...@@ -3,7 +3,7 @@ import {View, Text, StyleSheet, Image} from 'react-native';
import Icon from 'react-native-vector-icons/AntDesign'; import Icon from 'react-native-vector-icons/AntDesign';
import R from '../../assets/R'; import R from '../../assets/R';
import {WIDTHXD, HEIGHTXD, getFontXD, toPriceVnd} from '../../Config/Functions'; import {WIDTHXD, HEIGHTXD, getFontXD, toPriceVnd} from '../../Config/Functions';
import AppText from '../../components/AppText';
const Footer = (props) => { const Footer = (props) => {
return ( return (
<View style={{marginHorizontal: 20, marginTop: 10}}> <View style={{marginHorizontal: 20, marginTop: 10}}>
...@@ -12,7 +12,9 @@ const Footer = (props) => { ...@@ -12,7 +12,9 @@ const Footer = (props) => {
<Image source={R.images.moneyteam} style={styles.imgIcon} /> <Image source={R.images.moneyteam} style={styles.imgIcon} />
</View> </View>
<View style={{flex: 1, paddingHorizontal: 15}}> <View style={{flex: 1, paddingHorizontal: 15}}>
<Text style={styles.txt}>Doanh thu ca đội</Text> <AppText i18nKey={'RevenueTeam'} style={styles.txt}>
Doanh thu ca đội
</AppText>
<Text style={styles.txtMoney}>0 Đ</Text> <Text style={styles.txtMoney}>0 Đ</Text>
</View> </View>
<View style={{justifyContent: 'center', alignItems: 'center'}}> <View style={{justifyContent: 'center', alignItems: 'center'}}>
...@@ -25,7 +27,9 @@ const Footer = (props) => { ...@@ -25,7 +27,9 @@ const Footer = (props) => {
<Image source={R.images.moneysupport} style={styles.imgIcon} /> <Image source={R.images.moneysupport} style={styles.imgIcon} />
</View> </View>
<View style={{flex: 1, paddingHorizontal: 15}}> <View style={{flex: 1, paddingHorizontal: 15}}>
<Text style={styles.txt}>Doanh thu nhà tài tr</Text> <AppText i18nKey={'RevenueDonors'} style={styles.txt}>
Doanh thu nhà tài tr
</AppText>
<Text style={styles.txtMoney}> 0 Đ</Text> <Text style={styles.txtMoney}> 0 Đ</Text>
</View> </View>
<View style={{justifyContent: 'center', alignItems: 'center'}}> <View style={{justifyContent: 'center', alignItems: 'center'}}>
...@@ -38,7 +42,9 @@ const Footer = (props) => { ...@@ -38,7 +42,9 @@ const Footer = (props) => {
<Image source={R.images.moneyinvest} style={styles.imgIcon} /> <Image source={R.images.moneyinvest} style={styles.imgIcon} />
</View> </View>
<View style={{flex: 1, paddingHorizontal: 15}}> <View style={{flex: 1, paddingHorizontal: 15}}>
<Text style={styles.txt}>Đầu tư</Text> <AppText i18nKey={'Invset'} style={styles.txt}>
Đầu tư
</AppText>
<Text style={styles.txtMoney}>0 Đ</Text> <Text style={styles.txtMoney}>0 Đ</Text>
</View> </View>
<View style={{justifyContent: 'center', alignItems: 'center'}}> <View style={{justifyContent: 'center', alignItems: 'center'}}>
......
...@@ -10,6 +10,8 @@ import HeaderHome from '../../components/Header/HeaderHome'; ...@@ -10,6 +10,8 @@ import HeaderHome from '../../components/Header/HeaderHome';
import Footer from './Footer'; import Footer from './Footer';
import {HEIGHT, HEIGHTXD, toPriceVnd, getFontXD} from '../../Config/Functions'; import {HEIGHT, HEIGHTXD, toPriceVnd, getFontXD} from '../../Config/Functions';
import R from '../../assets/R'; import R from '../../assets/R';
import AppText from '../../components/AppText';
const HomeView = (props) => { const HomeView = (props) => {
const {total_deposit, total_withdraw} = props.data; const {total_deposit, total_withdraw} = props.data;
return ( return (
...@@ -23,7 +25,9 @@ const HomeView = (props) => { ...@@ -23,7 +25,9 @@ const HomeView = (props) => {
<View style={styles.row}> <View style={styles.row}>
<View style={styles.row}> <View style={styles.row}>
<View style={styles.itemMenu}> <View style={styles.itemMenu}>
<Text style={styles.txtTitle}>Np tin</Text> <AppText i18nKey={'Deposit'} style={styles.txtTitle}>
Np tin
</AppText>
<Text style={styles.txtMoney}> <Text style={styles.txtMoney}>
{' '} {' '}
{total_deposit == 0 ? 0 : toPriceVnd(total_deposit)} Đ{' '} {total_deposit == 0 ? 0 : toPriceVnd(total_deposit)} Đ{' '}
...@@ -33,7 +37,9 @@ const HomeView = (props) => { ...@@ -33,7 +37,9 @@ const HomeView = (props) => {
style={{width: 0.5, backgroundColor: R.colors.borderGray}} style={{width: 0.5, backgroundColor: R.colors.borderGray}}
/> />
<View style={styles.itemMenu}> <View style={styles.itemMenu}>
<Text style={styles.txtTitle}>Rút tin</Text> <AppText i18nKey={'Withdraw'} style={styles.txtTitle}>
Rút tin
</AppText>
<Text style={styles.txtMoney}> <Text style={styles.txtMoney}>
{' '} {' '}
{total_withdraw == 0 ? 0 : toPriceVnd(total_withdraw)} Đ{' '} {total_withdraw == 0 ? 0 : toPriceVnd(total_withdraw)} Đ{' '}
...@@ -44,17 +50,20 @@ const HomeView = (props) => { ...@@ -44,17 +50,20 @@ const HomeView = (props) => {
<View style={{height: 0.5, backgroundColor: R.colors.borderGray}} /> <View style={{height: 0.5, backgroundColor: R.colors.borderGray}} />
<View style={styles.row}> <View style={styles.row}>
<View style={styles.itemMenu}> <View style={styles.itemMenu}>
<Text style={styles.txtTitle}>Hoa hng</Text> <AppText i18nKey={'Rose'} style={styles.txtTitle}>
Hoa hng
</AppText>
<Text style={styles.txtMoney1}>0 Đ </Text> <Text style={styles.txtMoney1}>0 Đ </Text>
</View> </View>
<View style={{width: 0.5, backgroundColor: R.colors.borderGray}} /> <View style={{width: 0.5, backgroundColor: R.colors.borderGray}} />
<View style={styles.itemMenu}> <View style={styles.itemMenu}>
<Text style={styles.txtTitle}>Li nhun</Text> <AppText i18nKey={'Profit'} style={styles.txtTitle}>
Li nhun
</AppText>
<Text style={styles.txtMoney1}>0 Đ</Text> <Text style={styles.txtMoney1}>0 Đ</Text>
</View> </View>
</View> </View>
</View> </View>
<Footer /> <Footer />
</ScrollView> </ScrollView>
</ImageBackground> </ImageBackground>
......
...@@ -9,7 +9,7 @@ const Business = (props) => { ...@@ -9,7 +9,7 @@ const Business = (props) => {
const navigate = useNavigation(); const navigate = useNavigation();
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack title={'Kinh doanh chung'} /> <HeaderBack title={'GeneralBusiness'} />
<View style={styles.container}> <View style={styles.container}>
<Text <Text
style={{ style={{
......
...@@ -9,7 +9,7 @@ const Customer = (props) => { ...@@ -9,7 +9,7 @@ const Customer = (props) => {
const navigate = useNavigation(); const navigate = useNavigation();
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack title={'Khách hàng'} /> <HeaderBack title={'Customer'} />
<View style={styles.container}> <View style={styles.container}>
<Text <Text
style={{ style={{
......
...@@ -9,7 +9,7 @@ const Partner = (props) => { ...@@ -9,7 +9,7 @@ const Partner = (props) => {
const navigate = useNavigation(); const navigate = useNavigation();
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack title={'Quan hệ đối tác'} /> <HeaderBack title={'Partnership'} />
<View style={styles.container}> <View style={styles.container}>
<Text <Text
style={{ style={{
......
...@@ -7,7 +7,7 @@ import PickerSearch from '../../../components/Picker/PickerSearch'; ...@@ -7,7 +7,7 @@ import PickerSearch from '../../../components/Picker/PickerSearch';
const BonusTeam = (props) => { const BonusTeam = (props) => {
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack title={'Tiền thưởng đội nhóm'} /> <HeaderBack title={'TeamBonus'} />
<View <View
style={{ style={{
flex: 1, flex: 1,
......
...@@ -7,7 +7,7 @@ import {connect} from 'react-redux'; ...@@ -7,7 +7,7 @@ import {connect} from 'react-redux';
const MyGroup = (props) => { const MyGroup = (props) => {
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack isWhite={true} title={'Đối tác của tôi'} /> <HeaderBack isWhite={true} title={'MyPartner'} />
<WebView <WebView
androidHardwareAccelerationDisabled={true} androidHardwareAccelerationDisabled={true}
source={{ source={{
......
import React from 'react'; import React from 'react';
import {View, FlatList, Text} from 'react-native'; import {View, FlatList, Text} from 'react-native';
import HeaderSearch from '../../../components/Header/HeaderBack'; import HeaderBack from '../../../components/Header/HeaderBack';
import Item from './Item'; import Item from './Item';
const data = [ const data = [
...@@ -22,7 +22,7 @@ const data = [ ...@@ -22,7 +22,7 @@ const data = [
const Payments = (props) => { const Payments = (props) => {
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderSearch isWhite={false} title={'Các khoản thanh toán'} /> <HeaderBack isWhite={false} title={'Payments'} />
<View style={{justifyContent: 'center', alignItems: 'center', flex: 1}}> <View style={{justifyContent: 'center', alignItems: 'center', flex: 1}}>
<Text <Text
......
...@@ -16,7 +16,7 @@ const Tab = createMaterialTopTabNavigator(); ...@@ -16,7 +16,7 @@ const Tab = createMaterialTopTabNavigator();
const ProfileView = (props) => { const ProfileView = (props) => {
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack isWhite={true} title={'Thông tin cá nhân'} /> <HeaderBack isWhite={true} title={'MyProfile'} />
<Tab.Navigator <Tab.Navigator
initialRouteName="GeneralInfor" initialRouteName="GeneralInfor"
......
import React, {useState} from 'react'; import React, {useState} from 'react';
import {View, Text, FlatList} from 'react-native'; import {View, Text, FlatList, TouchableOpacity} from 'react-native';
import HeaderSB from '../../../components/Header/HeaderSB'; import HeaderSB from '../../../components/Header/HeaderSB';
import Item from './Item'; import Item from './Item';
import TextMoney from '../../../components/Input/InputMoney'; import TextMoney from '../../../components/Input/InputMoney';
import {toPriceVnd, numberFormat} from '../../../Config/Functions'; import {toPriceVnd, numberFormat} from '../../../Config/Functions';
import {changeLanguage} from '../../../actions/language';
import {connect} from 'react-redux';
const data = [ const data = [
{ {
id: '1', id: '1',
...@@ -57,11 +59,18 @@ const data = [ ...@@ -57,11 +59,18 @@ const data = [
}, },
]; ];
import AppText from '../../../components/AppText';
const Rose = (props) => { const Rose = (props) => {
const [text, setText] = useState(''); const [text, setText] = useState('');
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderSB title={'Hoa hồng'} /> <HeaderSB title={'Rose'} />
<TouchableOpacity onPress={() => props.changeLanguage('en')}>
<Text>Change</Text>
</TouchableOpacity>
<AppText i18nKey={'SetLanguage'}></AppText>
<View style={{justifyContent: 'center', alignItems: 'center', flex: 1}}> <View style={{justifyContent: 'center', alignItems: 'center', flex: 1}}>
<Text <Text
...@@ -84,4 +93,10 @@ const Rose = (props) => { ...@@ -84,4 +93,10 @@ const Rose = (props) => {
); );
}; };
export default Rose; const mapStateToProps = (state) => {
return {
loadingModal: state.ModalLoadingReducer,
};
};
export default connect(mapStateToProps, {changeLanguage})(Rose);
...@@ -96,7 +96,7 @@ const AddMethodPay = (props) => { ...@@ -96,7 +96,7 @@ const AddMethodPay = (props) => {
keyboardVerticalOffset={-50}> keyboardVerticalOffset={-50}>
<TouchableWithoutFeedback onPress={Keyboard.dismiss}> <TouchableWithoutFeedback onPress={Keyboard.dismiss}>
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack title={'Thêm phương thức thanh toán'} /> <HeaderBack title={'AddPaymentMethod'} />
<View style={styles.container}> <View style={styles.container}>
<View style={{flex: 1}}> <View style={{flex: 1}}>
<Text style={styles.txtTitle}>Chn ngân hàng </Text> <Text style={styles.txtTitle}>Chn ngân hàng </Text>
......
...@@ -100,7 +100,7 @@ const MethodPayDetail = (props) => { ...@@ -100,7 +100,7 @@ const MethodPayDetail = (props) => {
keyboardVerticalOffset={-50}> keyboardVerticalOffset={-50}>
<TouchableWithoutFeedback onPress={Keyboard.dismiss}> <TouchableWithoutFeedback onPress={Keyboard.dismiss}>
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack title={'Chi tiết phương thức'} /> <HeaderBack title={'DetailMethod'} />
<View style={{flex: 1}}> <View style={{flex: 1}}>
<View style={styles.container}> <View style={styles.container}>
<BankInfor <BankInfor
......
...@@ -15,7 +15,7 @@ const MethodPayView = (props) => { ...@@ -15,7 +15,7 @@ const MethodPayView = (props) => {
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack title={'Cài đặt phương thức thanh toán'} /> <HeaderBack title={'PaymentSetting'} />
<View style={{flex: 1}}> <View style={{flex: 1}}>
<FlatList <FlatList
keyExtractor={(item) => item.method} keyExtractor={(item) => item.method}
......
...@@ -9,7 +9,7 @@ const DepositView = (props) => { ...@@ -9,7 +9,7 @@ const DepositView = (props) => {
console.log(props.route); console.log(props.route);
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack isWhite={true} title={'Chi tiết'} /> <HeaderBack isWhite={true} title={'Detail'} />
<WebView <WebView
androidHardwareAccelerationDisabled={true} androidHardwareAccelerationDisabled={true}
domStorageEnabled={false} domStorageEnabled={false}
......
...@@ -67,7 +67,7 @@ const MediaDetail = (props) => { ...@@ -67,7 +67,7 @@ const MediaDetail = (props) => {
}; };
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack title={'Chi tiết video'} /> <HeaderBack title={'DetailVideo'} />
{data ? ( {data ? (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<YouTube <YouTube
......
...@@ -6,6 +6,7 @@ import Tab2 from './Tab2/Tab2'; ...@@ -6,6 +6,7 @@ import Tab2 from './Tab2/Tab2';
import Media from './Media/Media'; import Media from './Media/Media';
import Trading from './Tradding/Tradding'; import Trading from './Tradding/Tradding';
import Calendar from './Calendar/Calendar'; import Calendar from './Calendar/Calendar';
import I18n from '../../helper/i18/i18n';
import {createMaterialTopTabNavigator} from '@react-navigation/material-top-tabs'; import {createMaterialTopTabNavigator} from '@react-navigation/material-top-tabs';
const Tab = createMaterialTopTabNavigator(); const Tab = createMaterialTopTabNavigator();
...@@ -14,7 +15,7 @@ import HeaderDrawer from '../../components/Header/HeaderDrawer'; ...@@ -14,7 +15,7 @@ import HeaderDrawer from '../../components/Header/HeaderDrawer';
const NewFeed = (props) => { const NewFeed = (props) => {
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderDrawer title={'Tin tức'} isWhite={true} /> <HeaderDrawer title={'News'} isWhite={true} />
<View style={{flex: 1, backgroundColor: 'white'}}> <View style={{flex: 1, backgroundColor: 'white'}}>
<Tab.Navigator <Tab.Navigator
initialRouteName="GeneralInfor" initialRouteName="GeneralInfor"
...@@ -29,7 +30,7 @@ const NewFeed = (props) => { ...@@ -29,7 +30,7 @@ const NewFeed = (props) => {
<Tab.Screen <Tab.Screen
name="Tab1" name="Tab1"
component={Tab1} component={Tab1}
options={{tabBarLabel: 'Tin tức'}} options={{tabBarLabel: I18n.t('News')}}
/> />
<Tab.Screen <Tab.Screen
name="Tab2" name="Tab2"
...@@ -39,17 +40,17 @@ const NewFeed = (props) => { ...@@ -39,17 +40,17 @@ const NewFeed = (props) => {
<Tab.Screen <Tab.Screen
name="Tab3" name="Tab3"
component={Tab2} component={Tab2}
options={{tabBarLabel: 'Bảng giá'}} options={{tabBarLabel: I18n.t('PriceTable')}}
/> />
<Tab.Screen <Tab.Screen
name="Tab4" name="Tab4"
component={Trading} component={Trading}
options={{tabBarLabel: 'Biểu đồ'}} options={{tabBarLabel: I18n.t('Chart')}}
/> />
<Tab.Screen <Tab.Screen
name="CALENDAR" name="CALENDAR"
component={Calendar} component={Calendar}
options={{tabBarLabel: 'Lịch thị trường'}} options={{tabBarLabel: I18n.t('Calendar')}}
/> />
</Tab.Navigator> </Tab.Navigator>
</View> </View>
......
...@@ -11,26 +11,27 @@ import { ...@@ -11,26 +11,27 @@ import {
import HeaderDrawer from '../../components/Header/HeaderDrawer'; import HeaderDrawer from '../../components/Header/HeaderDrawer';
import Item from './Item'; import Item from './Item';
import {getFontXD} from '../../Config/Functions'; import {getFontXD} from '../../Config/Functions';
import AppText from '../../components/AppText';
const Fillters = [ const Fillters = [
{ {
id: '1', id: '1',
name: 'Tất cả', name: 'All',
value: 'ALL', value: 'ALL',
}, },
{ {
id: '2', id: '2',
name: 'Nạp tiền', name: 'Deposit',
value: 'DEPOSIT', value: 'DEPOSIT',
}, },
{ {
id: '3', id: '3',
name: 'Rút tiền', name: 'Withdraw',
value: 'WITHDRAW', value: 'WITHDRAW',
}, },
{ {
id: '4', id: '4',
name: 'Chuyển khoản', name: 'Transfer',
value: 'TRANSFER', value: 'TRANSFER',
}, },
]; ];
...@@ -40,7 +41,7 @@ const NotificaitonView = (props) => { ...@@ -40,7 +41,7 @@ const NotificaitonView = (props) => {
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderDrawer isWhite={true} title={'Thông báo'} /> <HeaderDrawer isWhite={true} title={'Notification'} />
<View style={styles.headerContainer}> <View style={styles.headerContainer}>
<ScrollView horizontal showsHorizontalScrollIndicator={false}> <ScrollView horizontal showsHorizontalScrollIndicator={false}>
...@@ -52,13 +53,14 @@ const NotificaitonView = (props) => { ...@@ -52,13 +53,14 @@ const NotificaitonView = (props) => {
styles.itemFillter, styles.itemFillter,
fillter == e.value ? {borderColor: '#1473E6'} : null, fillter == e.value ? {borderColor: '#1473E6'} : null,
]}> ]}>
<Text <AppText
i18nKey={e.name}
style={[ style={[
styles.txtFillter, styles.txtFillter,
fillter == e.value ? {color: '#1473E6'} : {}, fillter == e.value ? {color: '#1473E6'} : {},
]}> ]}>
{e.name} {e.name}
</Text> </AppText>
</TouchableOpacity> </TouchableOpacity>
))} ))}
</ScrollView> </ScrollView>
...@@ -66,13 +68,14 @@ const NotificaitonView = (props) => { ...@@ -66,13 +68,14 @@ const NotificaitonView = (props) => {
{data.length == 0 ? ( {data.length == 0 ? (
<View style={{justifyContent: 'center', alignItems: 'center', flex: 1}}> <View style={{justifyContent: 'center', alignItems: 'center', flex: 1}}>
<Text <AppText
i18nKey={'NoData'}
style={{ style={{
fontSize: 18, fontSize: 18,
fontWeight: 'bold', fontWeight: 'bold',
}}> }}>
Không có thông báo nào! Không có d liu!
</Text> </AppText>
</View> </View>
) : ( ) : (
<FlatList <FlatList
......
...@@ -6,7 +6,7 @@ import HeaderBack from '../../components/Header/HeaderBack'; ...@@ -6,7 +6,7 @@ import HeaderBack from '../../components/Header/HeaderBack';
const ServiceCustomerView = (props) => { const ServiceCustomerView = (props) => {
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack title={'Liên hệ vơi chúng tôi'} /> <HeaderBack title={'CustomerCare'} />
<View <View
style={{ style={{
flex: 1, flex: 1,
......
...@@ -19,12 +19,10 @@ const dataTest = [ ...@@ -19,12 +19,10 @@ const dataTest = [
const SettingView = (props) => { const SettingView = (props) => {
const [isEnabled, setIsEnabled] = useState(true); const [isEnabled, setIsEnabled] = useState(true);
const toggleSwitch = () => setIsEnabled((previousState) => !previousState); const toggleSwitch = () => setIsEnabled((previousState) => !previousState);
const [language, setLanguage] = useState(dataTest[0].name); const [language, setLanguage] = useState(dataTest[0].name);
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack title={'Cài đặt'} /> <HeaderBack title={'Setting'} />
<View style={{flex: 1, padding: 10}}> <View style={{flex: 1, padding: 10}}>
<View style={styles.row}> <View style={styles.row}>
<Text style={styles.txtTitle}>Bt thông báo</Text> <Text style={styles.txtTitle}>Bt thông báo</Text>
......
...@@ -20,3 +20,4 @@ export const SAVENAVIGATE = 'SAVENAVIGATE'; ...@@ -20,3 +20,4 @@ export const SAVENAVIGATE = 'SAVENAVIGATE';
export const NEW_SCREEN = 'NEW_SCREEN'; export const NEW_SCREEN = 'NEW_SCREEN';
export const CLEAR_SCREEN = 'CLEAR_SCREEN'; export const CLEAR_SCREEN = 'CLEAR_SCREEN';
export const CHANGE_LANGUAGE = 'CHANGE_LANGUAGE';
import {CHANGE_LANGUAGE} from './actionTypes';
export const changeLanguage = (language) => {
return {
type: CHANGE_LANGUAGE,
language,
};
};
...@@ -66,6 +66,7 @@ const images = { ...@@ -66,6 +66,7 @@ const images = {
bgLogin: require('./images/bgLogin.png'), bgLogin: require('./images/bgLogin.png'),
iconPaper: require('./images/iconPaper.png'), iconPaper: require('./images/iconPaper.png'),
iconNote: require('./images/iconNote.png'), iconNote: require('./images/iconNote.png'),
bg_cannot_connect: require('./images/bg_cannot_connect.png'),
}; };
export default images; export default images;
import React, {PureComponent} from 'react';
import {Text} from 'react-native';
import {connect} from 'react-redux';
import I18n from '../helper/i18/i18n';
class AppText extends React.Component {
constructor(props) {
super(props);
this.state = {
i18n: I18n,
};
}
componentWillMount() {
const {language} = this.props;
if (language) this.setMainLocaleLanguage(language);
}
componentWillReceiveProps = (nextProps) => {
const {language} = nextProps;
if (language) this.setMainLocaleLanguage(language);
};
setMainLocaleLanguage = (language) => {
let i18n = this.state.i18n;
i18n.locale = language;
this.setState({i18n});
};
render() {
const {i18nKey, style} = this.props;
const {i18n} = this.state;
return (
<Text style={style}>
{i18nKey ? i18n.t(i18nKey) : this.props.children}
</Text>
);
}
}
const mapStateToProps = (state) => {
return {
language: state.languageReducer.language,
};
};
export default connect(mapStateToProps, null)(AppText);
...@@ -18,48 +18,49 @@ import { ...@@ -18,48 +18,49 @@ import {
} from '../../routers/ScreenNames'; } from '../../routers/ScreenNames';
import {useNavigation} from '@react-navigation/native'; import {useNavigation} from '@react-navigation/native';
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import AppText from '../AppText';
const menus = [ const menus = [
{ {
id: '1', id: '1',
title: 'Xác minh tài khoản', title: 'AccountVerify',
icon: R.images.iconUserCheck, icon: R.images.iconUserCheck,
screen: AccountVerification, screen: AccountVerification,
}, },
{ {
id: '6', id: '6',
title: 'Hợp đồng', title: 'Contract',
icon: R.images.iconContract, icon: R.images.iconContract,
screen: CONTRACT, screen: CONTRACT,
}, },
{ {
id: '2', id: '2',
title: 'Cài đặt phương thức thanh toán', title: 'PaymentSetting',
icon: R.images.iconMethodPay, icon: R.images.iconMethodPay,
screen: METHODPAY, screen: METHODPAY,
}, },
{ {
id: '3', id: '3',
title: 'Liên hệ với dịch vụ khách hàng', title: 'CustomerCare',
icon: R.images.iconPhone, icon: R.images.iconPhone,
screen: SERVICECUSTOMER, screen: SERVICECUSTOMER,
}, },
{ {
id: '4', id: '4',
title: 'Phản hồi', title: 'Feedback',
icon: R.images.iconMess, icon: R.images.iconMess,
screen: FEEDBACK, screen: FEEDBACK,
}, },
{ {
id: '7', id: '7',
title: 'Giấy tờ pháp lý', title: 'LegalDocument',
icon: R.images.iconPaper, icon: R.images.iconPaper,
screen: LEGALDOCUMENT, screen: LEGALDOCUMENT,
}, },
{ {
id: '5', id: '5',
title: 'Cài đặt', title: 'Setting',
icon: R.images.iconSetting, icon: R.images.iconSetting,
screen: SETTING, screen: SETTING,
}, },
...@@ -97,7 +98,9 @@ const Drawer = (props) => { ...@@ -97,7 +98,9 @@ const Drawer = (props) => {
key={e.id} key={e.id}
style={styles.containerItem}> style={styles.containerItem}>
<Image source={e.icon} style={styles.imgIcon} /> <Image source={e.icon} style={styles.imgIcon} />
<Text style={styles.txtTitle}>{e.title}</Text> <AppText i18nKey={e.title} style={styles.txtTitle}>
{e.title}
</AppText>
</TouchableOpacity> </TouchableOpacity>
))} ))}
</View> </View>
...@@ -113,7 +116,9 @@ const Drawer = (props) => { ...@@ -113,7 +116,9 @@ const Drawer = (props) => {
}} }}
style={styles.footer}> style={styles.footer}>
<Icon name={'logout'} size={25} color={'#F81515'} /> <Icon name={'logout'} size={25} color={'#F81515'} />
<Text style={styles.txtTitle}>Đăng xut</Text> <AppText i18nKey={'Logout'} Logout style={styles.txtTitle}>
Đăng xut
</AppText>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
); );
......
...@@ -19,6 +19,8 @@ import {connect} from 'react-redux'; ...@@ -19,6 +19,8 @@ import {connect} from 'react-redux';
import {HEIGHTXD} from '../../Config/Functions'; import {HEIGHTXD} from '../../Config/Functions';
import {useNavigation} from '@react-navigation/native'; import {useNavigation} from '@react-navigation/native';
import SnackBar from '../SnackBar'; import SnackBar from '../SnackBar';
import AppText from '../AppText';
const HeaderHome = (props) => { const HeaderHome = (props) => {
const {title, isWhite} = props; const {title, isWhite} = props;
const navigate = useNavigation(); const navigate = useNavigation();
...@@ -35,8 +37,9 @@ const HeaderHome = (props) => { ...@@ -35,8 +37,9 @@ const HeaderHome = (props) => {
onPress={() => navigate.goBack()}> onPress={() => navigate.goBack()}>
<Image source={R.images.iconBack} style={styles.imgIcon} /> <Image source={R.images.iconBack} style={styles.imgIcon} />
</TouchableOpacity> </TouchableOpacity>
<AppText i18nKey={title} style={styles.txtTitle}>
<Text style={styles.txtTitle}>{title}</Text> {title}
</AppText>
<View style={{width: 35, height: 30}} /> <View style={{width: 35, height: 30}} />
</View> </View>
</ImageBackground> </ImageBackground>
......
...@@ -20,6 +20,8 @@ import {HEIGHTXD} from '../../Config/Functions'; ...@@ -20,6 +20,8 @@ import {HEIGHTXD} from '../../Config/Functions';
import Modal from 'react-native-modal'; import Modal from 'react-native-modal';
import Drawer from './Drawer'; import Drawer from './Drawer';
import SnackBar from '../SnackBar'; import SnackBar from '../SnackBar';
import AppText from '../AppText';
const HeaderDrawer = (props) => { const HeaderDrawer = (props) => {
const {title, isWhite} = props; const {title, isWhite} = props;
const [isModalVisible, setModalVisible] = useState(false); const [isModalVisible, setModalVisible] = useState(false);
...@@ -41,7 +43,9 @@ const HeaderDrawer = (props) => { ...@@ -41,7 +43,9 @@ const HeaderDrawer = (props) => {
<Image source={R.images.iconMenu} style={styles.imgIcon} /> <Image source={R.images.iconMenu} style={styles.imgIcon} />
</TouchableOpacity> </TouchableOpacity>
<Text style={styles.txtTitle}>{title}</Text> <AppText i18nKey={title} style={styles.txtTitle}>
{title}
</AppText>
<View style={{width: 35, height: 30}} /> <View style={{width: 35, height: 30}} />
</View> </View>
<Modal <Modal
......
...@@ -19,6 +19,9 @@ import {HEIGHTXD, toPriceVnd} from '../../Config/Functions'; ...@@ -19,6 +19,9 @@ import {HEIGHTXD, toPriceVnd} from '../../Config/Functions';
import Clipboard from '@react-native-clipboard/clipboard'; import Clipboard from '@react-native-clipboard/clipboard';
import SnackBar from '../SnackBar'; import SnackBar from '../SnackBar';
import {useNavigation} from '@react-navigation/native'; import {useNavigation} from '@react-navigation/native';
import I18n from '../../helper/i18/i18n';
import AppText from '../../components/AppText';
import { import {
WITHDRAW, WITHDRAW,
DEPOSIT, DEPOSIT,
...@@ -37,7 +40,9 @@ const renderWallet = (status, current_money, current_cqg_money, contract) => { ...@@ -37,7 +40,9 @@ const renderWallet = (status, current_money, current_cqg_money, contract) => {
return ( return (
<View style={{flex: 1, flexDirection: 'row'}}> <View style={{flex: 1, flexDirection: 'row'}}>
<View style={styles.containerWallet}> <View style={styles.containerWallet}>
<Text style={styles.txtWallet}>Tài khon ví</Text> <AppText i18nKey={'AccountWallet'} style={styles.txtWallet}>
Tài khon ví
</AppText>
<View style={{flexDirection: 'row'}}> <View style={{flexDirection: 'row'}}>
<Text style={styles.txtMoney}> <Text style={styles.txtMoney}>
{current_money == 0 ? 0 : toPriceVnd(current_money)} {current_money == 0 ? 0 : toPriceVnd(current_money)}
...@@ -47,7 +52,9 @@ const renderWallet = (status, current_money, current_cqg_money, contract) => { ...@@ -47,7 +52,9 @@ const renderWallet = (status, current_money, current_cqg_money, contract) => {
</View> </View>
<View style={{width: 1, backgroundColor: '#EDEDF1', height: '100%'}} /> <View style={{width: 1, backgroundColor: '#EDEDF1', height: '100%'}} />
<View style={styles.containerWallet}> <View style={styles.containerWallet}>
<Text style={styles.txtWallet}>Tài khon CQG</Text> <AppText i18nKey={'AccountCQG'} style={styles.txtWallet}>
Tài khon CQG
</AppText>
<View style={{flexDirection: 'row'}}> <View style={{flexDirection: 'row'}}>
<Text style={styles.txtMoney}> <Text style={styles.txtMoney}>
{current_cqg_money == 0 ? 0 : toPriceVnd(current_cqg_money)} {current_cqg_money == 0 ? 0 : toPriceVnd(current_cqg_money)}
...@@ -61,7 +68,9 @@ const renderWallet = (status, current_money, current_cqg_money, contract) => { ...@@ -61,7 +68,9 @@ const renderWallet = (status, current_money, current_cqg_money, contract) => {
return ( return (
<View style={{flex: 1, flexDirection: 'row'}}> <View style={{flex: 1, flexDirection: 'row'}}>
<View style={styles.containerWallet}> <View style={styles.containerWallet}>
<Text style={styles.txtWallet}>Tài khon ví</Text> <AppText i18nKey={'AccountWallet'} style={styles.txtWallet}>
Tài khon ví
</AppText>
<View style={{flexDirection: 'row'}}> <View style={{flexDirection: 'row'}}>
<Text style={styles.txtMoney}> <Text style={styles.txtMoney}>
{current_money == 0 ? 0 : toPriceVnd(current_money)} {current_money == 0 ? 0 : toPriceVnd(current_money)}
...@@ -71,9 +80,11 @@ const renderWallet = (status, current_money, current_cqg_money, contract) => { ...@@ -71,9 +80,11 @@ const renderWallet = (status, current_money, current_cqg_money, contract) => {
</View> </View>
<View style={{width: 1, backgroundColor: '#EDEDF1', height: '100%'}} /> <View style={{width: 1, backgroundColor: '#EDEDF1', height: '100%'}} />
<View style={styles.containerWallet}> <View style={styles.containerWallet}>
<Text style={[styles.txtWhite, {color: '#FFB721'}]}> <AppText
Ch m TK CQG i18nKey={'WaitOpenCQG'}
</Text> style={[styles.txtWhite, {color: '#FFB721'}]}>
Ch m TK CQG
</AppText>
</View> </View>
</View> </View>
); );
...@@ -81,7 +92,9 @@ const renderWallet = (status, current_money, current_cqg_money, contract) => { ...@@ -81,7 +92,9 @@ const renderWallet = (status, current_money, current_cqg_money, contract) => {
return ( return (
<View style={{flex: 1, flexDirection: 'row'}}> <View style={{flex: 1, flexDirection: 'row'}}>
<View style={styles.containerWallet}> <View style={styles.containerWallet}>
<Text style={styles.txtWallet}>Tài khon ví</Text> <AppText i18nKey={'AccountWallet'} style={styles.txtWallet}>
Tài khon ví
</AppText>
<View style={{flexDirection: 'row'}}> <View style={{flexDirection: 'row'}}>
<Text style={styles.txtMoney}> <Text style={styles.txtMoney}>
{' '} {' '}
...@@ -98,7 +111,9 @@ const renderWallet = (status, current_money, current_cqg_money, contract) => { ...@@ -98,7 +111,9 @@ const renderWallet = (status, current_money, current_cqg_money, contract) => {
navigate.navigate(PACKETCQG); navigate.navigate(PACKETCQG);
}} }}
style={styles.btn}> style={styles.btn}>
<Text style={styles.txtWhite}>M tài khon tht</Text> <AppText i18nKey={'OpenAccountCQG'} style={styles.txtWhite}>
M tài khon CQG
</AppText>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
</View> </View>
...@@ -119,9 +134,19 @@ const renderWallet = (status, current_money, current_cqg_money, contract) => { ...@@ -119,9 +134,19 @@ const renderWallet = (status, current_money, current_cqg_money, contract) => {
alignItems: 'center', alignItems: 'center',
}} }}
source={R.images.iconBtnGreen}> source={R.images.iconBtnGreen}>
<Text style={{fontSize: getFontXD(52), color: 'white'}}> {status == 2 ? (
{status == 2 ? 'Chờ xác minh' : 'Xác minh tài khoản'} <AppText
</Text> i18nKey={'WaitVerification'}
style={{fontSize: getFontXD(52), color: 'white'}}>
Ch xác minh
</AppText>
) : (
<AppText
i18nKey={'AccountVerify'}
style={{fontSize: getFontXD(52), color: 'white'}}>
Xác minh tài khon
</AppText>
)}
</ImageBackground> </ImageBackground>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
...@@ -129,9 +154,24 @@ const renderWallet = (status, current_money, current_cqg_money, contract) => { ...@@ -129,9 +154,24 @@ const renderWallet = (status, current_money, current_cqg_money, contract) => {
}; };
const renderLabel = (status) => { const renderLabel = (status) => {
if (status == 1) return <Text style={{color: '#E3434F'}}>Chưa xác minh</Text>; if (status == 1)
if (status == 2) return <Text style={{color: '#FFB721'}}>Ch xác minh</Text>; return (
if (status == 3) return <Text style={{color: '#17B217'}}>Đã xác minh</Text>; <AppText i18nKey={'NotVerified'} style={{color: '#E3434F'}}>
Chưa xác minh
</AppText>
);
if (status == 2)
return (
<AppText i18nKey={'Verified'} style={{color: '#FFB721'}}>
Ch xác minh
</AppText>
);
if (status == 3)
return (
<AppText i18nKey={'WaitVerification'} style={{color: '#17B217'}}>
Đã xác minh
</AppText>
);
}; };
const HeaderHome = (props) => { const HeaderHome = (props) => {
...@@ -193,26 +233,26 @@ const HeaderHome = (props) => { ...@@ -193,26 +233,26 @@ const HeaderHome = (props) => {
onPress={() => navigate.navigate(CHOOSEMETHOD)} onPress={() => navigate.navigate(CHOOSEMETHOD)}
style={styles.wraper}> style={styles.wraper}>
<Image style={styles.imgIcon} source={R.images.iconRecharge} /> <Image style={styles.imgIcon} source={R.images.iconRecharge} />
<Text style={styles.txt}>Np tin</Text> <AppText i18nKey={'Deposit'} style={styles.txt} />
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity <TouchableOpacity
onPress={() => navigate.navigate(WALLETWITHDRAW)} onPress={() => navigate.navigate(WALLETWITHDRAW)}
style={styles.wraper}> style={styles.wraper}>
<Image style={styles.imgIcon} source={R.images.iconWithdrawal} /> <Image style={styles.imgIcon} source={R.images.iconWithdrawal} />
<Text style={styles.txt}>Rút tin</Text> <AppText i18nKey={'Withdraw'} style={styles.txt} />
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity <TouchableOpacity
onPress={() => navigate.navigate(TRANSFER)} onPress={() => navigate.navigate(TRANSFER)}
style={styles.wraper}> style={styles.wraper}>
<Image style={styles.imgIcon} source={R.images.iconTransfer} /> <Image style={styles.imgIcon} source={R.images.iconTransfer} />
<Text style={styles.txt}>Chuyn khon</Text> <AppText i18nKey={'Transfer'} style={styles.txt} />
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity <TouchableOpacity
onPress={() => navigate.navigate(HISTORY)} onPress={() => navigate.navigate(HISTORY)}
style={styles.wraper}> style={styles.wraper}>
<Image style={styles.imgIcon} source={R.images.iconHistory} /> <Image style={styles.imgIcon} source={R.images.iconHistory} />
<Text style={styles.txt}>Lch s</Text> <AppText i18nKey={'History'} style={styles.txt} />
</TouchableOpacity> </TouchableOpacity>
</View> </View>
</View> </View>
......
...@@ -19,6 +19,7 @@ import {connect} from 'react-redux'; ...@@ -19,6 +19,7 @@ import {connect} from 'react-redux';
import {HEIGHTXD} from '../../Config/Functions'; import {HEIGHTXD} from '../../Config/Functions';
import Modal from 'react-native-modal'; import Modal from 'react-native-modal';
import Drawer from './Drawer'; import Drawer from './Drawer';
import AppText from '../../components/AppText';
const HeaderHome = (props) => { const HeaderHome = (props) => {
const [isModalVisible, setModalVisible] = useState(false); const [isModalVisible, setModalVisible] = useState(false);
...@@ -38,7 +39,9 @@ const HeaderHome = (props) => { ...@@ -38,7 +39,9 @@ const HeaderHome = (props) => {
<Image source={R.images.iconMenu} style={styles.imgIcon} /> <Image source={R.images.iconMenu} style={styles.imgIcon} />
</TouchableOpacity> </TouchableOpacity>
<Text style={styles.txtTitle}>Tài khon</Text> <AppText i18nKey={'Account'} style={styles.txtTitle}>
Tài khon
</AppText>
<View style={styles.imgIcon} /> <View style={styles.imgIcon} />
</View> </View>
<Modal <Modal
......
...@@ -22,6 +22,8 @@ import SnackBar from '../SnackBar'; ...@@ -22,6 +22,8 @@ import SnackBar from '../SnackBar';
import Icon from 'react-native-vector-icons/Ionicons'; import Icon from 'react-native-vector-icons/Ionicons';
import {useNavigation} from '@react-navigation/native'; import {useNavigation} from '@react-navigation/native';
import AppText from '../AppText';
const HeaderSearch = (props) => { const HeaderSearch = (props) => {
const {title, isWhite} = props; const {title, isWhite} = props;
...@@ -55,7 +57,9 @@ const HeaderSearch = (props) => { ...@@ -55,7 +57,9 @@ const HeaderSearch = (props) => {
value={txtSearch} value={txtSearch}
/> />
) : ( ) : (
<Text style={styles.txtTitle}>{title ? title : ''} </Text> <AppText i18nKey={title} style={styles.txtTitle}>
{title ? title : ''}{' '}
</AppText>
)} )}
<TouchableOpacity onPress={toggleSearch}> <TouchableOpacity onPress={toggleSearch}>
{openSearch ? ( {openSearch ? (
......
...@@ -57,7 +57,9 @@ const HeaderSearch = (props) => { ...@@ -57,7 +57,9 @@ const HeaderSearch = (props) => {
value={txtSearch} value={txtSearch}
/> />
) : ( ) : (
<Text style={styles.txtTitle}>{title ? title : ''} </Text> <AppText i18nKey={title} style={styles.txtTitle}>
{title}
</AppText>
)} )}
<TouchableOpacity onPress={toggleSearch}> <TouchableOpacity onPress={toggleSearch}>
{openSearch ? ( {openSearch ? (
......
...@@ -2,6 +2,7 @@ import React, {Component} from 'react'; ...@@ -2,6 +2,7 @@ import React, {Component} from 'react';
import {View, Text, TextInput, StyleSheet, Image} from 'react-native'; import {View, Text, TextInput, StyleSheet, Image} from 'react-native';
import R from '../../assets/R'; import R from '../../assets/R';
import {WIDTHXD, HEIGHTXD, getFontXD} from '../../Config/Functions'; import {WIDTHXD, HEIGHTXD, getFontXD} from '../../Config/Functions';
import AppText from '../AppText';
const InputIcon = (props) => { const InputIcon = (props) => {
const { const {
...@@ -18,7 +19,7 @@ const InputIcon = (props) => { ...@@ -18,7 +19,7 @@ const InputIcon = (props) => {
<View style={container}> <View style={container}>
<Image source={icon} style={iconImg} /> <Image source={icon} style={iconImg} />
<View style={wrapRight}> <View style={wrapRight}>
<Text>{title}</Text> <AppText i18nKey={title}>{title}</AppText>
<TextInput <TextInput
maxLength={maxLength} maxLength={maxLength}
autoCapitalize="none" autoCapitalize="none"
......
import React, {useEffect, useState} from 'react';
import {View, Text, StyleSheet, TouchableOpacity} from 'react-native';
import NetInfo from '@react-native-community/netinfo';
import FastImage from 'react-native-fast-image';
import R from '../assets/R';
const NoInternetComponent = (props) => {
const [isConnected, setConnect] = useState(true);
useEffect(() => {
const unsubscribe = NetInfo.addEventListener((state) => {
console.log(state);
setConnect(state.isConnected);
});
return unsubscribe;
}, []);
return !isConnected ? (
<View style={styles.offlineContainer}>
<FastImage
source={R.images.bg_cannot_connect}
style={styles.imageStyle}
/>
<Text style={styles.textStyle}>Không có kết nt Internet</Text>
<Text style={styles.subTextStyle}>Kim tra li đường truyn!</Text>
<TouchableOpacity
onPress={() => {
setTimeout(() => {
NetInfo.fetch().then((state) => {
setConnect(state.isConnected);
});
}, 3000);
}}>
<Text style={{alignSelf: 'center', color: 'blue'}}>Th li</Text>
</TouchableOpacity>
</View>
) : (
<View style={{width: 0, height: 0}} />
);
};
const styles = StyleSheet.create({
offlineContainer: {
width: '100%',
height: '100%',
backgroundColor: 'white',
justifyContent: 'center',
alignItems: 'center',
position: 'absolute',
},
offlineText: {
color: R.colors.white100,
},
textStyle: {
fontSize: 20,
color: 'black',
marginTop: 30,
},
subTextStyle: {
fontSize: 16,
color: R.colors.borderC,
marginVertical: 10,
},
imageStyle: {
width: '80%',
height: 200,
},
});
export default NoInternetComponent;
...@@ -77,7 +77,6 @@ const FirebaseNotification = (props) => { ...@@ -77,7 +77,6 @@ const FirebaseNotification = (props) => {
} }
}; };
const getFcmToken = async () => { const getFcmToken = async () => {
console.log('Chay vao day');
let fcmToken = await AsyncStorage.getItem(KEY.FIREBASE); let fcmToken = await AsyncStorage.getItem(KEY.FIREBASE);
console.log('fcmToken save', fcmToken); console.log('fcmToken save', fcmToken);
if (!fcmToken) { if (!fcmToken) {
......
import I18n from 'react-native-i18n';
import en from './locales/en';
import vi from './locales/vn';
I18n.translations = {
en,
vi,
};
export default I18n;
export default {
greeting: 'Hi!',
home: 'Home',
contact: 'Contact',
setting: 'Setting',
SetLanguage: ' Set language',
MyProfile: 'My Profile',
VerifyAccount: 'Verify account',
Payments: 'Payments',
Rose: 'Rose',
TeamBonus: 'Team bonus',
MyPartner: 'My partner',
Account: 'Account',
Notification: 'Notification',
News: 'News',
Deposit: 'Deposit',
Withdraw: 'Withdraw',
Transfer: 'Transfer',
History: 'History',
NotVerified: 'Not verified',
Verified: 'Verified',
WaitVerification: 'Waiting verification',
AccountWallet: 'Account wallet',
Wallet: 'Wallet',
AccountCQG: 'Account CQG',
WaitOpenCQG: 'Wait open CQG',
OpenAccountCQG: 'Open account CQG',
AccountVerify: 'Account verify',
Profit: 'Profit',
RevenueTeam: 'Revenue team',
RevenueDonors: 'Revenue donors',
Invset: 'Invest',
Contract: 'Contract',
PaymentSetting: 'Payment method setting',
CustomerCare: 'Customer care',
Feedback: 'Feedback',
LegalDocument: 'Legal document',
Setting: 'Setting',
Logout: 'Logout',
SelectPaymentMethod: 'Select Payment Method',
InvestmentDeposit: 'Investment deposit',
ForgotPassword: 'Forgot password',
VerifyOTP: 'Verify OTP',
ChangeNewPassword: 'Change new password',
SendFeedback: 'Send feedback',
GeneralBusiness: 'General business',
Customer: 'Customer',
LegalDocuments: 'Legal documents',
Partnership: 'Partnership',
AddPaymentMethod: 'Add payment method',
DetailMethod: 'Detail method',
Detail: 'Detail',
DetailVideo: 'Detail video',
NoData: 'No data!',
All: 'All',
PriceTable: 'Price table',
Chart: 'Chart',
Calendar: 'Calendar',
};
export default {
greeting: 'Xin chào!',
home: 'Trang chủ',
contact: 'Liên hệ',
setting: 'Cài đặt',
SetLanguage: 'Chọn ngôn ngữ',
MyProfile: 'Thông tin cá nhân',
VerifyAccount: 'Xác thực tài khoản',
Payments: 'Các khoản thanh toán',
Rose: 'Hoa hồng',
TeamBonus: 'Tiền thưởng đội nhóm',
MyPartner: 'Đối tác của tôi',
Account: 'Tài khoản',
Notification: 'Thông báo',
News: 'Tin tức',
Deposit: 'Nạp tiền',
Withdraw: 'Rút tiền',
Transfer: 'Chuyển khoản',
History: 'Lịch sử',
NotVerified: 'Chưa xác minh',
Verified: 'Đã xác minh',
WaitVerification: 'Chờ xác minh',
AccountWallet: 'Tài khoản ví',
AccountCQG: 'Tài khoản CQG',
WaitOpenCQG: 'Chờ mở TK CQG',
OpenAccountCQG: 'Mở tài khoản CQG',
AccountVerify: 'Xác minh tài khoản',
Profit: 'Lợi nhuận',
RevenueTeam: 'Doanh thu của đội',
RevenueDonors: 'Doanh thu nhà tài trợ',
Invset: 'Đầu tư',
Contract: 'Hợp đồng',
PaymentSetting: 'Cài đặt phương thức thanh toán',
CustomerCare: 'Chăm sóc khách hàng',
Feedback: 'Phản hồi',
LegalDocument: 'Giấy tờ pháp lý',
Setting: 'Cài đặt',
Logout: 'Đăng xuất',
Wallet: 'Ví',
SelectPaymentMethod: 'Chọn phương thức thanh toán',
InvestmentDeposit: 'Nạp tiền đầu tư',
ForgotPassword: 'Quên mật khẩu',
VerifyOTP: 'Xác minh OTP',
ChangeNewPassword: 'Thay đổi mật khẩu mới',
SendFeedback: 'Gửi phản hồi',
GeneralBusiness: 'Kinh doanh chung',
Customer: 'Khách hàng',
LegalDocuments: 'Giấy tờ pháp lý',
Partnership: 'Quan hệ đối tác',
AddPaymentMethod: 'Thêm phương thức thanh toán',
DetailMethod: 'Chi tiết phương thức',
Detail: 'Chi tiết',
DetailVideo: 'Chi tiết video',
NoData: 'Không có dữ liệu!',
All: 'Tất cả',
PriceTable: 'Bảng giá',
Chart: 'Biểu đồ',
Calendar: 'Lịch thị trường',
};
...@@ -22,6 +22,7 @@ import { ...@@ -22,6 +22,7 @@ import {
WALLET, WALLET,
WALLETWITHDRAW, WALLETWITHDRAW,
} from '../routers/ScreenNames'; } from '../routers/ScreenNames';
import AppText from '../components/AppText';
const PlussModal = (props) => { const PlussModal = (props) => {
const [isModalVisible, setModalVisible] = useState(false); const [isModalVisible, setModalVisible] = useState(false);
...@@ -53,7 +54,9 @@ const PlussModal = (props) => { ...@@ -53,7 +54,9 @@ const PlussModal = (props) => {
}} }}
style={styles.wraper1}> style={styles.wraper1}>
<Image style={styles.imgIcon} source={R.images.iconWallet1} /> <Image style={styles.imgIcon} source={R.images.iconWallet1} />
<Text style={styles.txt}>Ví tin</Text> <AppText i18nKey={'Wallet'} style={styles.txt}>
Ví tin
</AppText>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity <TouchableOpacity
onPress={() => { onPress={() => {
...@@ -62,7 +65,9 @@ const PlussModal = (props) => { ...@@ -62,7 +65,9 @@ const PlussModal = (props) => {
}} }}
style={styles.wraper1}> style={styles.wraper1}>
<Image style={styles.imgIcon} source={R.images.iconRecharge} /> <Image style={styles.imgIcon} source={R.images.iconRecharge} />
<Text style={styles.txt}>Np tin</Text> <AppText i18nKey={'Deposit'} style={styles.txt}>
Np tin
</AppText>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity <TouchableOpacity
onPress={() => { onPress={() => {
...@@ -71,7 +76,9 @@ const PlussModal = (props) => { ...@@ -71,7 +76,9 @@ const PlussModal = (props) => {
}} }}
style={styles.wraper1}> style={styles.wraper1}>
<Image style={styles.imgIcon} source={R.images.iconWithdrawal} /> <Image style={styles.imgIcon} source={R.images.iconWithdrawal} />
<Text style={styles.txt}>Rút tin</Text> <AppText i18nKey={'Withdraw'} style={styles.txt}>
Rút tin
</AppText>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity <TouchableOpacity
onPress={() => { onPress={() => {
...@@ -80,7 +87,9 @@ const PlussModal = (props) => { ...@@ -80,7 +87,9 @@ const PlussModal = (props) => {
}} }}
style={styles.wraper1}> style={styles.wraper1}>
<Image style={styles.imgIcon} source={R.images.iconTransfer} /> <Image style={styles.imgIcon} source={R.images.iconTransfer} />
<Text style={styles.txt}>Chuyn khon</Text> <AppText i18nKey={'Transfer'} style={styles.txt}>
Chuyn khon
</AppText>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
</View> </View>
......
...@@ -16,6 +16,7 @@ import Notification from '../Screens/Notification/Notification'; ...@@ -16,6 +16,7 @@ import Notification from '../Screens/Notification/Notification';
import Test from '../Screens/NewFeed/Test'; import Test from '../Screens/NewFeed/Test';
import {useNavigation} from '@react-navigation/native'; import {useNavigation} from '@react-navigation/native';
import {AccountVerification, PACKETCQG} from '../routers/ScreenNames'; import {AccountVerification, PACKETCQG} from '../routers/ScreenNames';
import I18n from '../helper/i18/i18n';
const Tab = createBottomTabNavigator(); const Tab = createBottomTabNavigator();
const PayScreenComponent = () => { const PayScreenComponent = () => {
...@@ -79,7 +80,7 @@ const TabNavigator = (props) => { ...@@ -79,7 +80,7 @@ const TabNavigator = (props) => {
name="Screen2" name="Screen2"
component={Account} component={Account}
options={{ options={{
tabBarLabel: 'Tài khoản', tabBarLabel: I18n.t('Account'),
tabBarIcon: ({color, size}) => ( tabBarIcon: ({color, size}) => (
<Icon name="user-tie" size={size} color={color} /> <Icon name="user-tie" size={size} color={color} />
), ),
...@@ -98,7 +99,7 @@ const TabNavigator = (props) => { ...@@ -98,7 +99,7 @@ const TabNavigator = (props) => {
name="Screen3" name="Screen3"
component={Notification} component={Notification}
options={{ options={{
tabBarLabel: 'Thông báo', tabBarLabel: I18n.t('Notification'),
tabBarIcon: ({color, size}) => ( tabBarIcon: ({color, size}) => (
<Ionicons <Ionicons
name="ios-notifications-outline" name="ios-notifications-outline"
...@@ -112,7 +113,7 @@ const TabNavigator = (props) => { ...@@ -112,7 +113,7 @@ const TabNavigator = (props) => {
name="Screen4" name="Screen4"
component={NewFeed} component={NewFeed}
options={{ options={{
tabBarLabel: 'Tin tức', tabBarLabel: I18n.t('News'),
tabBarIcon: ({color, size}) => ( tabBarIcon: ({color, size}) => (
<Ionicons name="newspaper-outline" size={size} color={color} /> <Ionicons name="newspaper-outline" size={size} color={color} />
), ),
......
...@@ -1496,6 +1496,11 @@ ...@@ -1496,6 +1496,11 @@
resolved "https://registry.yarnpkg.com/@react-native-community/masked-view/-/masked-view-0.1.10.tgz" resolved "https://registry.yarnpkg.com/@react-native-community/masked-view/-/masked-view-0.1.10.tgz"
integrity sha512-rk4sWFsmtOw8oyx8SD3KSvawwaK7gRBSEIy2TAwURyGt+3TizssXP1r8nx3zY+R7v2vYYHXZ+k2/GULAT/bcaQ== integrity sha512-rk4sWFsmtOw8oyx8SD3KSvawwaK7gRBSEIy2TAwURyGt+3TizssXP1r8nx3zY+R7v2vYYHXZ+k2/GULAT/bcaQ==
"@react-native-community/netinfo@^6.0.0":
version "6.0.0"
resolved "https://registry.yarnpkg.com/@react-native-community/netinfo/-/netinfo-6.0.0.tgz#2a4d7190b508dd0c2293656c9c1aa068f6f60a71"
integrity sha512-Z9M8VGcF2IZVOo2x+oUStvpCW/8HjIRi4+iQCu5n+PhC7OqCQX58KYAzdBr///alIfRXiu6oMb+lK+rXQH1FvQ==
"@react-native-firebase/app-types@6.7.2": "@react-native-firebase/app-types@6.7.2":
version "6.7.2" version "6.7.2"
resolved "https://registry.yarnpkg.com/@react-native-firebase/app-types/-/app-types-6.7.2.tgz#d2e1530af5702e00578914b41468898c10d3289c" resolved "https://registry.yarnpkg.com/@react-native-firebase/app-types/-/app-types-6.7.2.tgz#d2e1530af5702e00578914b41468898c10d3289c"
...@@ -4054,6 +4059,11 @@ human-signals@^1.1.1: ...@@ -4054,6 +4059,11 @@ human-signals@^1.1.1:
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz"
integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==
i18n-js@3.0.11:
version "3.0.11"
resolved "https://registry.yarnpkg.com/i18n-js/-/i18n-js-3.0.11.tgz#f9e96bdb641c5b9d6be12759d7c422089987ef02"
integrity sha512-v7dG3kYJTQTyox3NqDabPDE/ZotWntyMI9kh4cYi+XlCSnsIR+KBTS2opPyObL8WndnklcLzbNU92FP/mLge3Q==
iconv-lite@0.4.24, iconv-lite@^0.4.17: iconv-lite@0.4.24, iconv-lite@^0.4.17:
version "0.4.24" version "0.4.24"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz"
...@@ -6612,6 +6622,11 @@ react-native-datepicker@^1.7.2: ...@@ -6612,6 +6622,11 @@ react-native-datepicker@^1.7.2:
dependencies: dependencies:
moment "^2.22.0" moment "^2.22.0"
react-native-fast-image@^8.3.4:
version "8.3.4"
resolved "https://registry.yarnpkg.com/react-native-fast-image/-/react-native-fast-image-8.3.4.tgz#79edca177e30311b19d59ff335625bcbe22650d7"
integrity sha512-LpzAdjUphihUpVEBn5fEv5AILe55rHav0YiZroPZ1rumKDhAl4u2cG01ku2Pb7l8sayjTsNu7FuURAlXUUDsow==
react-native-gesture-handler@^1.9.0: react-native-gesture-handler@^1.9.0:
version "1.10.3" version "1.10.3"
resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-1.10.3.tgz" resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-1.10.3.tgz"
...@@ -6623,6 +6638,13 @@ react-native-gesture-handler@^1.9.0: ...@@ -6623,6 +6638,13 @@ react-native-gesture-handler@^1.9.0:
invariant "^2.2.4" invariant "^2.2.4"
prop-types "^15.7.2" prop-types "^15.7.2"
react-native-i18n@^2.0.15:
version "2.0.15"
resolved "https://registry.yarnpkg.com/react-native-i18n/-/react-native-i18n-2.0.15.tgz#09b5a9836116fa7dbd0054c46e2d1014c1ef3c65"
integrity sha512-V8VwUP0TLda3oJvgt5tdnFaOV7WXPhTjCTLO7sXI3C2SHggSbD4bCUryMzNJhesimJidH21V2Owvj4zAylHoQQ==
dependencies:
i18n-js "3.0.11"
react-native-image-crop-picker@^0.36.0: react-native-image-crop-picker@^0.36.0:
version "0.36.0" version "0.36.0"
resolved "https://registry.yarnpkg.com/react-native-image-crop-picker/-/react-native-image-crop-picker-0.36.0.tgz" resolved "https://registry.yarnpkg.com/react-native-image-crop-picker/-/react-native-image-crop-picker-0.36.0.tgz"
...@@ -6753,13 +6775,6 @@ react-native@0.62.2: ...@@ -6753,13 +6775,6 @@ react-native@0.62.2:
use-subscription "^1.0.0" use-subscription "^1.0.0"
whatwg-fetch "^3.0.0" whatwg-fetch "^3.0.0"
react-number-format@^4.5.5:
version "4.5.5"
resolved "https://registry.yarnpkg.com/react-number-format/-/react-number-format-4.5.5.tgz#563807ee142a03857111115806d39767bc698797"
integrity sha512-3NGqgSbMUwRwgJ4852RH24UFkW89yx/e0P78Hwmf3TajLMKCOJ7DPJCcl/6z+2+HpJ8AG7je/J8na3ykWx8acg==
dependencies:
prop-types "^15.7.2"
react-redux@^7.2.2: react-redux@^7.2.2:
version "7.2.2" version "7.2.2"
resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.2.tgz" resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.2.tgz"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment