Commit 90712a05 by Giang Tran

Merge branch 'splash' into 08_April

parents 057c8d4e b20a248d
import React from 'react'; import React, {useEffect, useRef, useState} from 'react';
import {Animated, Dimensions, StyleSheet, Text, View} from 'react-native';
import BootSplash from 'react-native-bootsplash';
import {Provider} from 'react-redux'; import {Provider} from 'react-redux';
import {createStore, applyMiddleware} from 'redux'; import {createStore, applyMiddleware} from 'redux';
import rootReducer from './src/Reducers/index'; import rootReducer from './src/Reducers/index';
...@@ -7,16 +8,58 @@ import RootView from './src/RootView'; ...@@ -7,16 +8,58 @@ import RootView from './src/RootView';
import createSagaMiddleware from 'redux-saga'; import createSagaMiddleware from 'redux-saga';
import rootSaga from './src/Saga/rootSaga'; import rootSaga from './src/Saga/rootSaga';
let bootSplashLogo = require('./src/assets/images/iconSplash.png');
let fakeApiCallWithoutBadNetwork = (ms) =>
new Promise((resolve) => setTimeout(resolve, ms));
const sagaMiddleware = createSagaMiddleware(); const sagaMiddleware = createSagaMiddleware();
let store = createStore(rootReducer, applyMiddleware(sagaMiddleware)); let store = createStore(rootReducer, applyMiddleware(sagaMiddleware));
sagaMiddleware.run(rootSaga); sagaMiddleware.run(rootSaga);
const App = () => {
let App = () => {
let init = async () => {
await fakeApiCallWithoutBadNetwork(1000);
await BootSplash.hide();
};
useEffect(() => {
init();
}, []);
return ( return (
<Provider store={store}> <View style={styles.container}>
<RootView /> <Provider store={store}>
</Provider> <RootView />
</Provider>
</View>
); );
}; };
const styles = StyleSheet.create({
container: {
flex: 1,
},
text: {
fontSize: 24,
fontWeight: '700',
margin: 20,
lineHeight: 30,
color: '#333',
textAlign: 'center',
},
bootsplash: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#1C6AF6',
},
logo: {
width: 250,
height: 80,
resizeMode: 'contain',
},
});
export default App; export default App;
...@@ -193,9 +193,10 @@ dependencies { ...@@ -193,9 +193,10 @@ dependencies {
//noinspection GradleDynamicVersion //noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules implementation "com.facebook.react:react-native:+" // From node_modules
implementation project(':react-native-bootsplash')
implementation 'androidx.appcompat:appcompat:1.1.0-rc01' implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
......
...@@ -20,13 +20,21 @@ ...@@ -20,13 +20,21 @@
android:name=".MainActivity" android:name=".MainActivity"
android:label="@string/app_name" android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:launchMode="singleTop" android:exported="true"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"> android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity> </activity>
<activity
android:name="com.zoontek.rnbootsplash.RNBootSplashActivity"
android:theme="@style/BootTheme"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" /> <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application> </application>
......
package com.invest; package com.invest;
import android.os.Bundle;
import com.facebook.react.ReactActivity; import com.facebook.react.ReactActivity;
import com.zoontek.rnbootsplash.RNBootSplash;
public class MainActivity extends ReactActivity { public class MainActivity extends ReactActivity {
...@@ -12,4 +15,10 @@ public class MainActivity extends ReactActivity { ...@@ -12,4 +15,10 @@ public class MainActivity extends ReactActivity {
protected String getMainComponentName() { protected String getMainComponentName() {
return "Invest"; return "Invest";
} }
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
RNBootSplash.init(R.drawable.bootsplash, MainActivity.this); // <- display the generated bootsplash.xml drawable over our MainActivity
}
} }
...@@ -14,6 +14,9 @@ import com.facebook.soloader.SoLoader; ...@@ -14,6 +14,9 @@ import com.facebook.soloader.SoLoader;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.util.List; import java.util.List;
import com.facebook.react.ReactApplication; //<- Dòng này import com.facebook.react.ReactApplication; //<- Dòng này
import io.invertase.firebase.messaging.RNFirebaseMessagingPackage;//<- Dòng này
import io.invertase.firebase.notifications.RNFirebaseNotificationsPackage;//<- Dòng này
import com.zoontek.rnbootsplash.RNBootSplashPackage;
public class MainApplication extends Application implements ReactApplication { public class MainApplication extends Application implements ReactApplication {
...@@ -30,6 +33,9 @@ public class MainApplication extends Application implements ReactApplication { ...@@ -30,6 +33,9 @@ public class MainApplication extends Application implements ReactApplication {
List<ReactPackage> packages = new PackageList(this).getPackages(); List<ReactPackage> packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for example: // Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage()); // packages.add(new MyReactNativePackage());
packages.add(new RNFirebaseMessagingPackage());//<- Dòng này
packages.add(new RNFirebaseNotificationsPackage());//<- Dòng này
// packages.add(new RNBootSplashPackage());
return packages; return packages;
} }
...@@ -49,6 +55,7 @@ public class MainApplication extends Application implements ReactApplication { ...@@ -49,6 +55,7 @@ public class MainApplication extends Application implements ReactApplication {
super.onCreate(); super.onCreate();
SoLoader.init(this, /* native exopackage */ false); SoLoader.init(this, /* native exopackage */ false);
initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
// RNBootSplash.init(R.drawable.bootsplash, MainActivity.this);
} }
/** /**
......
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:opacity="opaque">
<item android:drawable="@color/bootsplash_background" />
<item>
<bitmap android:src="@mipmap/bootsplash_logo" android:gravity="center" />
</item>
</layer-list>
<resources>
<color name="bootsplash_background">#1C6AF6</color>
</resources>
...@@ -5,5 +5,8 @@ ...@@ -5,5 +5,8 @@
<!-- Customize your theme here. --> <!-- Customize your theme here. -->
<item name="android:textColor">#000000</item> <item name="android:textColor">#000000</item>
</style> </style>
<style name="BootTheme" parent="AppTheme">
<!-- set the generated bootsplash.xml drawable as activity background -->
<item name="android:background">@drawable/bootsplash</item>
</style>
</resources> </resources>
rootProject.name = 'Invest' rootProject.name = 'Invest'
include ':react-native-bootsplash'
project(':react-native-bootsplash').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-bootsplash/android')
include ':react-native-linear-gradient' include ':react-native-linear-gradient'
project(':react-native-linear-gradient').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-linear-gradient/android') project(':react-native-linear-gradient').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-linear-gradient/android')
include ':react-native-vector-icons' include ':react-native-vector-icons'
include ':react-native-bootsplash'
project(':react-native-bootsplash').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-bootsplash/android')
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android') project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
include ':react-native-vector-icons' include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android') project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
......
...@@ -19,6 +19,13 @@ ...@@ -19,6 +19,13 @@
2DCD954D1E0B4F2C00145EB5 /* InvestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* InvestTests.m */; }; 2DCD954D1E0B4F2C00145EB5 /* InvestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* InvestTests.m */; };
2FCC6749524E697FC9323F22 /* libPods-Invest-InvestTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ABCEBFE5646F1EF68E7C87AB /* libPods-Invest-InvestTests.a */; }; 2FCC6749524E697FC9323F22 /* libPods-Invest-InvestTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ABCEBFE5646F1EF68E7C87AB /* libPods-Invest-InvestTests.a */; };
48E6A9A75AE9C55476F21D2D /* libPods-Invest-tvOSTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4ECD31835B4784D2DC719E76 /* libPods-Invest-tvOSTests.a */; }; 48E6A9A75AE9C55476F21D2D /* libPods-Invest-tvOSTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4ECD31835B4784D2DC719E76 /* libPods-Invest-tvOSTests.a */; };
<<<<<<< HEAD
=======
52B7A0A425F722CF00CEDA09 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 52B7A0A325F722CF00CEDA09 /* GoogleService-Info.plist */; };
52B7A0A525F722CF00CEDA09 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 52B7A0A325F722CF00CEDA09 /* GoogleService-Info.plist */; };
52FB2B09262400D400DD7983 /* BootSplash.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 52FB2B08262400D400DD7983 /* BootSplash.storyboard */; };
52FB2B0A262400D400DD7983 /* BootSplash.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 52FB2B08262400D400DD7983 /* BootSplash.storyboard */; };
>>>>>>> splash
BEE4F63E354049C2D225330D /* libPods-Invest.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F96EA7789D1E36A43479651 /* libPods-Invest.a */; }; BEE4F63E354049C2D225330D /* libPods-Invest.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F96EA7789D1E36A43479651 /* libPods-Invest.a */; };
C58809ADB943708AF0E7E27E /* libPods-Invest-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FC653233E0AC368FCB03B57C /* libPods-Invest-tvOS.a */; }; C58809ADB943708AF0E7E27E /* libPods-Invest-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FC653233E0AC368FCB03B57C /* libPods-Invest-tvOS.a */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
...@@ -59,6 +66,7 @@ ...@@ -59,6 +66,7 @@
2D02E4901E0B4A5D006451C7 /* Invest-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Invest-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 2D02E4901E0B4A5D006451C7 /* Invest-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Invest-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
4ECD31835B4784D2DC719E76 /* libPods-Invest-tvOSTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Invest-tvOSTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 4ECD31835B4784D2DC719E76 /* libPods-Invest-tvOSTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Invest-tvOSTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
52E1A15225F1255E00EA970D /* Invest.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = Invest.entitlements; path = Invest/Invest.entitlements; sourceTree = "<group>"; }; 52E1A15225F1255E00EA970D /* Invest.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = Invest.entitlements; path = Invest/Invest.entitlements; sourceTree = "<group>"; };
52FB2B08262400D400DD7983 /* BootSplash.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = BootSplash.storyboard; path = Invest/BootSplash.storyboard; sourceTree = "<group>"; };
5F96EA7789D1E36A43479651 /* libPods-Invest.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Invest.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 5F96EA7789D1E36A43479651 /* libPods-Invest.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Invest.a"; sourceTree = BUILT_PRODUCTS_DIR; };
72B39130AB01DE9359CED049 /* Pods-Invest-InvestTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Invest-InvestTests.release.xcconfig"; path = "Target Support Files/Pods-Invest-InvestTests/Pods-Invest-InvestTests.release.xcconfig"; sourceTree = "<group>"; }; 72B39130AB01DE9359CED049 /* Pods-Invest-InvestTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Invest-InvestTests.release.xcconfig"; path = "Target Support Files/Pods-Invest-InvestTests/Pods-Invest-InvestTests.release.xcconfig"; sourceTree = "<group>"; };
7A8D76C2B302272AF1BB9AE1 /* Pods-Invest-InvestTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Invest-InvestTests.debug.xcconfig"; path = "Target Support Files/Pods-Invest-InvestTests/Pods-Invest-InvestTests.debug.xcconfig"; sourceTree = "<group>"; }; 7A8D76C2B302272AF1BB9AE1 /* Pods-Invest-InvestTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Invest-InvestTests.debug.xcconfig"; path = "Target Support Files/Pods-Invest-InvestTests/Pods-Invest-InvestTests.debug.xcconfig"; sourceTree = "<group>"; };
...@@ -144,6 +152,7 @@ ...@@ -144,6 +152,7 @@
13B07FAE1A68108700A75B9A /* Invest */ = { 13B07FAE1A68108700A75B9A /* Invest */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
52FB2B08262400D400DD7983 /* BootSplash.storyboard */,
9345F6C125FF213F006B5233 /* Fonts */, 9345F6C125FF213F006B5233 /* Fonts */,
52E1A15225F1255E00EA970D /* Invest.entitlements */, 52E1A15225F1255E00EA970D /* Invest.entitlements */,
008F07F21AC5B25A0029DE68 /* main.jsbundle */, 008F07F21AC5B25A0029DE68 /* main.jsbundle */,
...@@ -400,7 +409,12 @@ ...@@ -400,7 +409,12 @@
files = ( files = (
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
<<<<<<< HEAD
13869AC326244FB000412A7A /* GoogleService-Info.plist in Resources */, 13869AC326244FB000412A7A /* GoogleService-Info.plist in Resources */,
=======
52B7A0A425F722CF00CEDA09 /* GoogleService-Info.plist in Resources */,
52FB2B09262400D400DD7983 /* BootSplash.storyboard in Resources */,
>>>>>>> splash
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -408,6 +422,7 @@ ...@@ -408,6 +422,7 @@
isa = PBXResourcesBuildPhase; isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
52FB2B0A262400D400DD7983 /* BootSplash.storyboard in Resources */,
2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */, 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
...@@ -895,7 +910,7 @@ ...@@ -895,7 +910,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 = 16; CURRENT_PROJECT_VERSION = 17;
DEVELOPMENT_TEAM = MXZ24GRH48; DEVELOPMENT_TEAM = MXZ24GRH48;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
GCC_PREPROCESSOR_DEFINITIONS = ( GCC_PREPROCESSOR_DEFINITIONS = (
...@@ -928,7 +943,7 @@ ...@@ -928,7 +943,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 = 16; CURRENT_PROJECT_VERSION = 17;
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";
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
@import Firebase; @import Firebase;
#import <AVFoundation/AVFoundation.h> #import <AVFoundation/AVFoundation.h>
#import "RNBootSplash.h"
#if DEBUG #if DEBUG
#import <FlipperKit/FlipperClient.h> #import <FlipperKit/FlipperClient.h>
#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h> #import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
...@@ -50,7 +50,7 @@ static void InitializeFlipper(UIApplication *application) { ...@@ -50,7 +50,7 @@ static void InitializeFlipper(UIApplication *application) {
rootViewController.view = rootView; rootViewController.view = rootView;
self.window.rootViewController = rootViewController; self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible]; [self.window makeKeyAndVisible];
[RNBootSplash initWithStoryboard:@"BootSplash" rootView:rootView];
// [CallAppInterface setHomeViewController:rootViewController]; // [CallAppInterface setHomeViewController:rootViewController];
return YES; return YES;
} }
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17147" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17120"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" autoresizesSubviews="NO" userInteractionEnabled="NO" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView autoresizesSubviews="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" image="BootSplashLogo" translatesAutoresizingMaskIntoConstraints="NO" id="3lX-Ut-9ad">
<rect key="frame" x="77.5" y="296.5" width="220" height="74"/>
<accessibility key="accessibilityConfiguration">
<accessibilityTraits key="traits" image="YES" notEnabled="YES"/>
</accessibility>
</imageView>
</subviews>
<viewLayoutGuide key="safeArea" id="Bcu-3y-fUS"/>
<color key="backgroundColor" red="0.109803921568627" green="0.415686274509804" blue="0.964705882352941" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<accessibility key="accessibilityConfiguration">
<accessibilityTraits key="traits" notEnabled="YES"/>
</accessibility>
<constraints>
<constraint firstItem="3lX-Ut-9ad" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="Fh9-Fy-1nT"/>
<constraint firstItem="3lX-Ut-9ad" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="nvB-Ic-PnI"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="0.0" y="0.0"/>
</scene>
</scenes>
<resources>
<image name="BootSplashLogo" width="220" height="74"/>
</resources>
</document>
{
"images": [
{
"idiom": "universal",
"filename": "bootsplash_logo.png",
"scale": "1x"
},
{
"idiom": "universal",
"filename": "bootsplash_logo@2x.png",
"scale": "2x"
},
{
"idiom": "universal",
"filename": "bootsplash_logo@3x.png",
"scale": "3x"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<string>remote-notification</string> <string>remote-notification</string>
</array> </array>
<key>UILaunchStoryboardName</key> <key>UILaunchStoryboardName</key>
<string>LaunchScreen</string> <string>BootSplash</string>
<key>UIRequiredDeviceCapabilities</key> <key>UIRequiredDeviceCapabilities</key>
<array> <array>
<string>armv7</string> <string>armv7</string>
......
...@@ -80,6 +80,7 @@ target 'Invest' do ...@@ -80,6 +80,7 @@ target 'Invest' do
pod 'RNFBMessaging', :path => '../node_modules/@react-native-firebase/messaging' pod 'RNFBMessaging', :path => '../node_modules/@react-native-firebase/messaging'
pod 'RNBootSplash', :path => '../node_modules/react-native-bootsplash'
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons' pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
......
...@@ -361,6 +361,8 @@ PODS: ...@@ -361,6 +361,8 @@ PODS:
- React-cxxreact (= 0.62.2) - React-cxxreact (= 0.62.2)
- React-jsi (= 0.62.2) - React-jsi (= 0.62.2)
- ReactCommon/callinvoker (= 0.62.2) - ReactCommon/callinvoker (= 0.62.2)
- RNBootSplash (3.2.0):
- React-Core
- RNCAsyncStorage (1.12.1): - RNCAsyncStorage (1.12.1):
- React-Core - React-Core
- RNCCheckbox (0.5.7): - RNCCheckbox (0.5.7):
...@@ -450,6 +452,7 @@ DEPENDENCIES: ...@@ -450,6 +452,7 @@ DEPENDENCIES:
- React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
- ReactCommon/callinvoker (from `../node_modules/react-native/ReactCommon`) - ReactCommon/callinvoker (from `../node_modules/react-native/ReactCommon`)
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
- RNBootSplash (from `../node_modules/react-native-bootsplash`)
- "RNCAsyncStorage (from `../node_modules/@react-native-community/async-storage`)" - "RNCAsyncStorage (from `../node_modules/@react-native-community/async-storage`)"
- "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`)"
...@@ -550,6 +553,8 @@ EXTERNAL SOURCES: ...@@ -550,6 +553,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/Libraries/Vibration" :path: "../node_modules/react-native/Libraries/Vibration"
ReactCommon: ReactCommon:
:path: "../node_modules/react-native/ReactCommon" :path: "../node_modules/react-native/ReactCommon"
RNBootSplash:
:path: "../node_modules/react-native-bootsplash"
RNCAsyncStorage: RNCAsyncStorage:
:path: "../node_modules/@react-native-community/async-storage" :path: "../node_modules/@react-native-community/async-storage"
RNCCheckbox: RNCCheckbox:
...@@ -628,6 +633,7 @@ SPEC CHECKSUMS: ...@@ -628,6 +633,7 @@ SPEC CHECKSUMS:
React-RCTText: fae545b10cfdb3d247c36c56f61a94cfd6dba41d React-RCTText: fae545b10cfdb3d247c36c56f61a94cfd6dba41d
React-RCTVibration: 4356114dbcba4ce66991096e51a66e61eda51256 React-RCTVibration: 4356114dbcba4ce66991096e51a66e61eda51256
ReactCommon: ed4e11d27609d571e7eee8b65548efc191116eb3 ReactCommon: ed4e11d27609d571e7eee8b65548efc191116eb3
RNBootSplash: 24175aa28fe203b10c48dc34e78d946fd33c77af
RNCAsyncStorage: b03032fdbdb725bea0bd9e5ec5a7272865ae7398 RNCAsyncStorage: b03032fdbdb725bea0bd9e5ec5a7272865ae7398
RNCCheckbox: d1749e6a92178ce5dbc31e63becd1f34f0c76bbd RNCCheckbox: d1749e6a92178ce5dbc31e63becd1f34f0c76bbd
RNCClipboard: 245417a78ab585e0d4d83926c28907e7b2bc24bd RNCClipboard: 245417a78ab585e0d4d83926c28907e7b2bc24bd
...@@ -644,6 +650,10 @@ SPEC CHECKSUMS: ...@@ -644,6 +650,10 @@ SPEC CHECKSUMS:
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
YoutubePlayer-in-WKWebView: cfbf46da51d7370662a695a8f351e5fa1d3e1008 YoutubePlayer-in-WKWebView: cfbf46da51d7370662a695a8f351e5fa1d3e1008
<<<<<<< HEAD
PODFILE CHECKSUM: 0aed8e9b9bcc932aca0489409733bbdf33d0b8bc PODFILE CHECKSUM: 0aed8e9b9bcc932aca0489409733bbdf33d0b8bc
=======
PODFILE CHECKSUM: a0276896cf4bf6dbd0e780acaa769b26a97ccce1
>>>>>>> splash
COCOAPODS: 1.10.1 COCOAPODS: 1.10.1
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
"react": "16.11.0", "react": "16.11.0",
"react-hook-form": "^6.15.4", "react-hook-form": "^6.15.4",
"react-native": "0.62.2", "react-native": "0.62.2",
"react-native-bootsplash": "^3.2.0",
"react-native-confirmation-code-field": "^6.5.1", "react-native-confirmation-code-field": "^6.5.1",
"react-native-datepicker": "^1.7.2", "react-native-datepicker": "^1.7.2",
"@react-native-firebase/app": "^7.1.0", "@react-native-firebase/app": "^7.1.0",
......
...@@ -98,7 +98,20 @@ export const Gender = { ...@@ -98,7 +98,20 @@ export const Gender = {
male: 0, male: 0,
female: 1, female: 1,
}; };
export const converType = (type) => {
if (type == 'DEPOSIT') return 'Nạp tiền';
return 'Rút tiền';
};
export const converStatus = (status) => {
switch (status) {
case 0:
return 'Chờ xử lý';
case 1:
return 'Thành công';
case 2:
return 'Huỷ';
}
};
export const toPriceVnd = (str) => { export const toPriceVnd = (str) => {
if (str) { if (str) {
let stringPrice = str.toString().split('.'); let stringPrice = str.toString().split('.');
......
...@@ -10,47 +10,47 @@ import R from './assets/R'; ...@@ -10,47 +10,47 @@ import R from './assets/R';
import FirebaseNotification from './helper/FirebaseNotification'; import FirebaseNotification from './helper/FirebaseNotification';
import messaging from '@react-native-firebase/messaging'; import messaging from '@react-native-firebase/messaging';
import {enableScreens} from 'react-native-screens'; import {enableScreens} from 'react-native-screens';
import AsyncStorage from "@react-native-community/async-storage"; import AsyncStorage from '@react-native-community/async-storage';
import KEY from "./assets/AsynStorage"; import KEY from './assets/AsynStorage';
import firebase from "@react-native-firebase/app"; import firebase from '@react-native-firebase/app';
enableScreens(); enableScreens();
const RootView = (props) => { const RootView = (props) => {
messaging().setBackgroundMessageHandler(async remoteMessage => { messaging().setBackgroundMessageHandler(async (remoteMessage) => {
console.log('Message handled in the background!', remoteMessage); console.log('Message handled in the background!', remoteMessage);
});
useEffect(() => {
requestUserPermission();
const unsubscribe = messaging().onMessage(async (remoteMessage) => {
console.log('A new FCM message arrived!', remoteMessage);
}); });
useEffect(() => { return unsubscribe;
requestUserPermission(); }, []);
const unsubscribe = messaging().onMessage(async remoteMessage => {
console.log('A new FCM message arrived!', remoteMessage);
});
return unsubscribe;
}, []);
const requestUserPermission = async () => { const requestUserPermission = async () => {
const authStatus = await messaging().requestPermission(); const authStatus = await messaging().requestPermission();
const enabled = const enabled =
authStatus === messaging.AuthorizationStatus.AUTHORIZED || authStatus === messaging.AuthorizationStatus.AUTHORIZED ||
authStatus === messaging.AuthorizationStatus.PROVISIONAL; authStatus === messaging.AuthorizationStatus.PROVISIONAL;
if (enabled) { if (enabled) {
getFcmToken() getFcmToken();
console.log('Authorization status:', authStatus); console.log('Authorization status:', authStatus);
}
} }
const getFcmToken = async () => { };
let fcmToken = await AsyncStorage.getItem(KEY.FIREBASE); const getFcmToken = async () => {
console.log('Dat tao', fcmToken); let fcmToken = await AsyncStorage.getItem(KEY.FIREBASE);
if (!fcmToken) { console.log('Dat tao', fcmToken);
fcmToken = await messaging().getToken(); if (!fcmToken) {
console.log('Vua tao', fcmToken); fcmToken = await messaging().getToken();
if (fcmToken) { console.log('Vua tao', fcmToken);
AsyncStorage.setItem(KEY.FIREBASE, fcmToken); if (fcmToken) {
} AsyncStorage.setItem(KEY.FIREBASE, fcmToken);
} }
} }
};
onReceived = (notification) => {}; onReceived = (notification) => {};
onOpened = (notification) => { onOpened = (notification) => {
console.log(('notification', notification)); console.log(('notification', notification));
}; };
......
import React from 'react'; import React from 'react';
import {View, Text} from 'react-native'; import {View, Text} from 'react-native';
import HeaderBack from '../../components/Header/HeaderBack'; import HeaderBack from '../../components/Header/HeaderBack';
import {connect} from 'react-redux';
import {WebView} from 'react-native-webview';
const Contract = (props) => { const Contract = (props) => {
console.log(props.user);
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack title={'Hợp đồng'} /> <HeaderBack isWhite={true} title={'Hợp đồng'} />
<View
style={{ <WebView
flex: 1, androidHardwareAccelerationDisabled={true}
paddingHorizontal: 20, source={{
justifyContent: 'center', uri:
alignItems: 'center', 'http://api.dcvinvest.com/webview/contracts/show/' + props.user.uid,
}}> }}
<Text />
style={{
fontSize: 18,
fontWeight: 'bold',
textAlign: 'center',
}}>
Tính năng đang được phát trin, vui lòng quay li sau!
</Text>
</View>
</View> </View>
); );
}; };
export default Contract; const mapStateToProps = (state) => {
return {
user: state.userReducer,
};
};
export default connect(mapStateToProps, {})(Contract);
...@@ -4,38 +4,39 @@ import HistoryView from './HistoryView'; ...@@ -4,38 +4,39 @@ import HistoryView from './HistoryView';
import {getListTransaction} from '../../../apis/Functions/Widthdraw'; import {getListTransaction} from '../../../apis/Functions/Widthdraw';
const History = (props) => { const History = (props) => {
const [selected, setSelected] = useState(''); const [selected, setSelected] = useState('ALL');
const [page, setPage] = useState(1); const [page, setPage] = useState(1);
const [data, setData] = useState([]); const [data, setData] = useState([]);
const [tottalPage, setTotalPage] = useState(1); const [tottalPage, setTotalPage] = useState(1);
const [isRefresh, setisRefresh] = useState(false); const [isRefresh, setisRefresh] = useState(false);
const [fillters, setFillters] = useState([]);
useEffect(() => { useEffect(() => {
getData(); getData();
}, []); }, []);
// useEffect(() => { useEffect(() => {
// getData(); getData();
// }, [selected]); }, [selected]);
const getData = async () => { const getData = async () => {
setisRefresh(true); setisRefresh(true);
setPage(1); setPage(1);
const res = await getListTransaction({ const res = await getListTransaction({
keyword: '', keyword: '',
type: 'ALL', type: selected,
platform: Platform.OS, platform: Platform.OS,
page_size: 10, page_size: 10,
status: -1,
page_index: 1, page_index: 1,
start_date: '', start_date: '',
end_date: '', end_date: '',
}); });
console.log(res);
setisRefresh(false); setisRefresh(false);
if ((res.data.code = 200 && res.data.data)) { if ((res.data.code = 200 && res.data.data)) {
setData(res.data.data); setData(res.data.data);
setTotalPage(res.data.meta.pages); setTotalPage(res.data.meta.pages);
console.log(res.data.data);
} else { } else {
Alert.alert('Thông báo!', res.data.message); Alert.alert('Thông báo!', res.data.message);
} }
...@@ -46,18 +47,20 @@ const History = (props) => { ...@@ -46,18 +47,20 @@ const History = (props) => {
}; };
const onLoadMore = () => { const onLoadMore = () => {
console.log(tottalPage); if (page < tottalPage) getDataLoadMore();
// if (page < tottalPage) getDataLoadMore();
}; };
const getDataLoadMore = async () => { const getDataLoadMore = async () => {
setisRefresh(true); setisRefresh(true);
const res = await getListNew({ const res = await getListTransaction({
keyword: '', keyword: '',
category_id: selected, type: 'ALL',
platform: Platform.OS, platform: Platform.OS,
page_size: 10, page_size: 10,
status: -1,
page_index: page + 1, page_index: page + 1,
start_date: '',
end_date: '',
}); });
setPage(page + 1); setPage(page + 1);
...@@ -73,6 +76,8 @@ const History = (props) => { ...@@ -73,6 +76,8 @@ const History = (props) => {
isRefresh={isRefresh} isRefresh={isRefresh}
onRefresh={onRefresh} onRefresh={onRefresh}
data={data} data={data}
selected={selected}
setSelected={setSelected}
/> />
); );
}; };
......
import React, {useState} from 'react'; import React, {useState} from 'react';
import {View, Text, FlatList, TouchableOpacity, StyleSheet} from 'react-native'; import {
View,
Text,
FlatList,
TouchableOpacity,
StyleSheet,
ScrollView,
} from 'react-native';
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';
const Fillters = [ const Fillters = [
{ {
id: '1', id: '1',
name: 'Tất cả', name: 'Tất cả',
value: 'all', value: 'ALL',
}, },
{ {
id: '4', id: '2',
name: 'Rút tiền', name: 'Nạp tiền',
value: 'withdraw', value: 'DEPOSIT',
}, },
{ {
id: '5', id: '3',
name: 'Nạp tiền', name: 'Rút tiền',
value: 'deposit', value: 'WITHDRAW',
}, },
{ {
id: '6', id: '4',
name: 'Chuyển khoản', name: 'Chuyển khoản',
value: 'exchange', value: 'TRANSFER',
}, },
]; ];
// const data = [
// {
// id: '1',
// money: 10000000,
// content: 'Hoạt động: Nạp tiền',
// status: 1,
// date: '20/02/2021',
// },
// {
// id: '2',
// money: 2000000,
// content: 'Hoạt động: Nạp tiền',
// status: 1,
// date: '20/02/2021',
// },
// {
// id: '3',
// day: '20',
// money: 3000000,
// content: 'Hoạt động: Nạp tiền',
// status: 1,
// date: '20/02/2021',
// },
// {
// id: '4',
// money: 4000000,
// content: 'Hoạt động: Rút tiền',
// status: 2,
// date: '20/02/2021',
// },
// {
// id: '5',
// money: 9000000,
// content: 'Hoạt động: Nạp tiền',
// status: 1,
// date: '20/02/2021',
// },
// {
// id: '6',
// money: 4000000,
// content: 'Hoạt động: Rút tiền',
// status: 2,
// date: '20/02/2021',
// },
// {
// id: '7',
// money: 9000000,
// content: 'Hoạt động: Nạp tiền',
// status: 1,
// date: '20/02/2021',
// },
// ];
const HistoryView = (props) => { const HistoryView = (props) => {
const {isRefresh, onRefresh, onLoadMore, data} = props; const {isRefresh, onRefresh, onLoadMore, data, selected, setSelected} = props;
const [selected, setSelected] = useState('1');
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack isWhite={true} title={'LỊCH SỬ'} /> <HeaderBack isWhite={true} title={'LỊCH SỬ'} />
<View style={{flex: 1}}> <View style={{flex: 1}}>
<View style={styles.headerContainer}> <View style={styles.headerContainer}>
<FlatList {Fillters.map((e) => (
showsHorizontalScrollIndicator={false} <TouchableOpacity
horizontal key={e.value}
data={Fillters} onPress={() => setSelected(e.value)}
keyExtractor={(item) => item.id} style={[
renderItem={({item}) => ( styles.itemFillter,
<TouchableOpacity selected == e.value ? {borderColor: '#1473E6'} : null,
onPress={() => setSelected(item.id)} ]}>
<Text
style={[ style={[
styles.itemFillter, styles.txtFillter,
selected == item.id ? {borderColor: '#1473E6'} : null, selected == e.value ? {color: '#1473E6'} : {},
]}> ]}>
<Text {e.name}
style={[ </Text>
styles.txtFillter, </TouchableOpacity>
selected == item.id ? {color: '#1473E6'} : {}, ))}
]}>
{item.name}
</Text>
</TouchableOpacity>
)}
/>
</View> </View>
<FlatList
style={{flex: 1}} {data.length == 0 ? (
refreshing={isRefresh} <View
onRefresh={onRefresh} style={{justifyContent: 'center', alignItems: 'center', flex: 1}}>
onEndReachedThreshold={0.01} <Text
onEndReached={(info) => { style={{
onLoadMore(); fontSize: getFontXD(46),
}} fontWeight: 'bold',
keyExtractor={(item) => item.id} }}>
data={data} Không có giao dch nào!
renderItem={({item}) => <Item item={item} />} </Text>
/> </View>
) : (
<FlatList
style={{flex: 1}}
refreshing={isRefresh}
onRefresh={onRefresh}
onEndReachedThreshold={0.01}
onEndReached={(info) => {
onLoadMore();
}}
keyExtractor={(item) => item.id}
data={data}
renderItem={({item}) => <Item item={item} />}
/>
)}
</View> </View>
</View> </View>
); );
...@@ -132,6 +94,10 @@ const styles = StyleSheet.create({ ...@@ -132,6 +94,10 @@ const styles = StyleSheet.create({
headerContainer: { headerContainer: {
paddingVertical: 10, paddingVertical: 10,
backgroundColor: 'white', backgroundColor: 'white',
flexDirection: 'row',
justifyContent: 'space-around',
alignItems: 'center',
paddingHorizontal: 10,
}, },
itemFillter: { itemFillter: {
borderRadius: 10, borderRadius: 10,
...@@ -139,7 +105,6 @@ const styles = StyleSheet.create({ ...@@ -139,7 +105,6 @@ const styles = StyleSheet.create({
paddingHorizontal: 10, paddingHorizontal: 10,
borderWidth: 1, borderWidth: 1,
borderColor: '#929292', borderColor: '#929292',
marginLeft: 15,
minWidth: 70, minWidth: 70,
}, },
txtFillter: { txtFillter: {
......
...@@ -5,6 +5,8 @@ import { ...@@ -5,6 +5,8 @@ import {
HEIGHTXD, HEIGHTXD,
WIDTHXD, WIDTHXD,
toPriceVnd, toPriceVnd,
converType,
converStatus,
} from '../../../Config/Functions'; } from '../../../Config/Functions';
import R from '../../../assets/R'; import R from '../../../assets/R';
import Block from '../../../components/Block'; import Block from '../../../components/Block';
...@@ -16,62 +18,46 @@ const Item = (props) => { ...@@ -16,62 +18,46 @@ const Item = (props) => {
// console.log('item---', item.status); // console.log('item---', item.status);
const navigate = useNavigation(); const navigate = useNavigation();
return ( return (
<TouchableOpacity onPress={() => console.log('HEllo')}> <View style={styles.container}>
<View style={styles.container}> <Block flex={1} row>
<Block flex={1} row> <View style={styles.wrapLeft} />
<View style={styles.wrapLeft} /> <View style={styles.wrapDate}>
<View style={styles.wrapDate}> <Image source={{uri: item.icon}} style={styles.imgIcon} />
{item.status == 1 ? ( </View>
<Image source={R.images.iconRecharge} style={styles.imgIcon} /> <Block
) : ( style={{justifyContent: 'center'}}
<Image source={R.images.iconWithdrawal} style={styles.imgIcon} /> padding={[5, 10]}
)} space={'between'}
</View> flex={1}>
<Block <View
style={{justifyContent: 'center'}} style={{
padding={[5, 10]} flexDirection: 'row',
space={'between'} justifyContent: 'space-between',
flex={1}> }}>
<View <View
style={{ style={{
flexDirection: 'row', alignItems: 'flex-start',
justifyContent: 'space-between',
}}> }}>
<View <Text style={styles.txtBlack}>
style={{ {converType(item.transection_category)}
alignItems: 'flex-start', </Text>
}}> <Text style={styles.txt}>{item.transection_date_timestamp}</Text>
<Text style={styles.txtBlack}>{item.content}</Text> </View>
<Text style={styles.txt}>{item.date}</Text>
</View>
<View style={{alignItems: 'flex-end'}}> <View style={{alignItems: 'flex-end'}}>
{item.status == 1 ? ( <Text
<Text style={[
style={{ styles.txtMoney,
fontSize: getFontXD(42), item.status == 1 ? {color: '#1473E6'} : null,
fontWeight: 'bold', ]}>
color: '#F99D1D', {toPriceVnd(item.amount)} Đ
}}> </Text>
{toPriceVnd(item.money)} Đ <Text style={styles.txt}>{converStatus(item.status)}</Text>
</Text>
) : (
<Text
style={{
fontSize: getFontXD(42),
fontWeight: 'bold',
color: '#1473E6',
}}>
{toPriceVnd(item.money)} Đ
</Text>
)}
<Text style={styles.txt}>Hoàn tt</Text>
</View>
</View> </View>
</Block> </View>
</Block> </Block>
</View> </Block>
</TouchableOpacity> </View>
); );
}; };
...@@ -109,10 +95,20 @@ const styles = StyleSheet.create({ ...@@ -109,10 +95,20 @@ const styles = StyleSheet.create({
txt: { txt: {
fontSize: getFontXD(36), fontSize: getFontXD(36),
color: '#C4C4C4', color: '#C4C4C4',
marginTop: 10,
fontStyle: 'italic',
}, },
imgIcon: { imgIcon: {
width: WIDTHXD(178), width: WIDTHXD(178),
height: HEIGHTXD(178), height: HEIGHTXD(178),
resizeMode: 'contain', resizeMode: 'contain',
}, },
txtMoney: {
fontSize: getFontXD(42),
fontWeight: 'bold',
color: '#F99D1D',
},
txtBlack: {
fontSize: getFontXD(42),
},
}); });
...@@ -5,6 +5,7 @@ import { ...@@ -5,6 +5,7 @@ import {
HEIGHTXD, HEIGHTXD,
WIDTHXD, WIDTHXD,
toPriceVnd, toPriceVnd,
converType,
} from '../../../../Config/Functions'; } from '../../../../Config/Functions';
import R from '../../../../assets/R'; import R from '../../../../assets/R';
import Block from '../../../../components/Block'; import Block from '../../../../components/Block';
...@@ -18,31 +19,35 @@ const Item = (props) => { ...@@ -18,31 +19,35 @@ const Item = (props) => {
<TouchableOpacity onPress={() => console.log('hello')}> <TouchableOpacity onPress={() => console.log('hello')}>
<View style={styles.container}> <View style={styles.container}>
<Block flex={1} row> <Block flex={1} row>
<View style={[styles.wrapLeft, {backgroundColor: item.color}]} /> {/* <View style={[styles.wrapLeft, {backgroundColor: item.color}]} />
<View style={styles.wrapDate}> <View style={styles.wrapDate}>
<Text style={styles.txt}>T{item.month}</Text> <Text style={styles.txt}>T{item.month}</Text>
<Text style={styles.txtTitle}>{item.day}</Text> <Text style={styles.txtTitle}>{item.day}</Text>
</View> </View> */}
<Block <Block
style={styles.wrapRight} style={styles.wrapRight}
padding={[5, 10]} padding={[10, 10]}
space={'between'} space={'between'}
flex={1}> flex={1}>
<View style={styles.rowBet}> <View style={styles.rowBet}>
<Text style={styles.txtTitle}>{item.name}</Text> <Text style={styles.txtTitle}>
{converType(item.transection_category)}
</Text>
<Text <Text
style={{ style={{
fontSize: getFontXD(42), fontSize: getFontXD(42),
fontWeight: 'bold', fontWeight: 'bold',
color: '#FFB721', color: '#FFB721',
}}> }}>
{toPriceVnd(item.money)} {toPriceVnd(item.amount)}
</Text> </Text>
</View> </View>
<Text numberOfLines={2} style={styles.txt}> <Text numberOfLines={2} style={styles.txt}>
{item.note} {item.comments}
</Text>
<Text style={styles.txtDate}>
{item.transection_date_timestamp}
</Text> </Text>
<Text style={styles.txtDate}>Ngày {item.date}</Text>
</Block> </Block>
</Block> </Block>
</View> </View>
......
import React from 'react'; import React, {useState, useEffect} from 'react';
import {View, Text, FlatList} from 'react-native'; 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';
const data = [ import {getListTransaction} from '../../../../apis/Functions/Widthdraw';
{
id: '1',
month: 2,
day: '20',
name: 'Nạp tiền',
money: 10000000,
note: 'Ghi chú nap tiền để đầu tư',
status: 1,
date: '20/02/2021',
},
{
id: '2',
month: 2,
day: '20',
name: 'Nạp tiền',
money: 2000000,
note: 'Ghi chú nap tiền để đầu tư',
status: 1,
date: '20/02/2021',
},
{
id: '3',
month: 2,
day: '20',
name: 'Nạp tiền',
money: 3000000,
note: 'Ghi chú nap tiền để đầu tư',
status: 1,
date: '20/02/2021',
},
{
id: '4',
month: 2,
day: '20',
name: 'Nạp tiền',
money: 4000000,
note: 'Ghi chú nap tiền để đầu tư',
status: 1,
date: '20/02/2021',
},
{
id: '5',
month: 2,
day: '20',
name: 'Nạp tiền',
money: 9000000,
note: 'Ghi chú nap tiền để đầu tư',
status: 1,
date: '20/02/2021',
},
];
const Success = (props) => { const Success = (props) => {
const [page, setPage] = useState(1);
const [data, setData] = useState([]);
const [tottalPage, setTotalPage] = useState(1);
const [isRefresh, setisRefresh] = useState(false);
useEffect(() => {
getData();
}, []);
const getData = async () => {
setisRefresh(true);
setPage(1);
const res = await getListTransaction({
keyword: '',
type: 'ALL',
platform: Platform.OS,
page_size: 10,
status: -1,
page_index: 1,
start_date: '',
end_date: '',
});
console.log(res.data);
setisRefresh(false);
if ((res.data.code = 200 && res.data.data)) {
setData(res.data.data);
setTotalPage(res.data.meta.pages);
} else {
Alert.alert('Thông báo!', res.data.message);
}
};
const onRefresh = () => {
getData();
};
const onLoadMore = () => {
console.log(tottalPage);
if (page < tottalPage) getDataLoadMore();
};
const getDataLoadMore = async () => {
setisRefresh(true);
const res = await getListTransaction({
keyword: '',
type: 'ALL',
platform: Platform.OS,
page_size: 10,
status: 1,
page_index: page + 1,
start_date: '',
end_date: '',
});
setPage(page + 1);
if (res.data.code == 200) {
setData(data.concat(res.data.data));
}
setisRefresh(false);
};
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<FlatList <FlatList
keyExtractor={(item) => item.id} keyExtractor={(item) => item.transection_id}
refreshing={isRefresh}
onRefresh={onRefresh}
onEndReachedThreshold={0.01}
onEndReached={(info) => {
onLoadMore();
}}
data={data} data={data}
renderItem={({item}) => <Item item={item} />} renderItem={({item}) => <Item item={item} />}
/> />
......
import React from 'react'; import React, {useState, useEffect} from 'react';
import {View, Text, FlatList} from 'react-native'; 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';
const data = [ import {getListTransaction} from '../../../../apis/Functions/Widthdraw';
{
id: '1',
month: 2,
day: '20',
name: 'Nạp tiền',
money: 10000000,
note: 'Ghi chú nap tiền để đầu tư',
status: 1,
date: '20/02/2021',
},
{
id: '2',
month: 2,
day: '20',
name: 'Nạp tiền',
money: 2000000,
note: 'Ghi chú nap tiền để đầu tư',
status: 1,
date: '20/02/2021',
},
{
id: '3',
month: 2,
day: '20',
name: 'Nạp tiền',
money: 3000000,
note: 'Ghi chú nap tiền để đầu tư',
status: 1,
date: '20/02/2021',
},
{
id: '4',
month: 2,
day: '20',
name: 'Nạp tiền',
money: 4000000,
note: 'Ghi chú nap tiền để đầu tư',
status: 1,
date: '20/02/2021',
},
{
id: '5',
month: 2,
day: '20',
name: 'Nạp tiền',
money: 9000000,
note: 'Ghi chú nap tiền để đầu tư',
status: 1,
date: '20/02/2021',
},
];
const Watting = (props) => { const Watting = (props) => {
const [page, setPage] = useState(1);
const [data, setData] = useState([]);
const [tottalPage, setTotalPage] = useState(1);
const [isRefresh, setisRefresh] = useState(false);
useEffect(() => {
getData();
}, []);
const getData = async () => {
setisRefresh(true);
setPage(1);
const res = await getListTransaction({
keyword: '',
type: 'ALL',
platform: Platform.OS,
page_size: 10,
status: 0,
page_index: 1,
start_date: '',
end_date: '',
});
console.log(res.data);
setisRefresh(false);
if ((res.data.code = 200 && res.data.data)) {
setData(res.data.data);
setTotalPage(res.data.meta.pages);
} else {
Alert.alert('Thông báo!', res.data.message);
}
};
const onRefresh = () => {
getData();
};
const onLoadMore = () => {
console.log(tottalPage);
if (page < tottalPage) getDataLoadMore();
};
const getDataLoadMore = async () => {
setisRefresh(true);
const res = await getListTransaction({
keyword: '',
type: 'ALL',
platform: Platform.OS,
page_size: 10,
status: -1,
page_index: page + 1,
start_date: '',
end_date: '',
});
setPage(page + 1);
if (res.data.code == 200) {
setData(data.concat(res.data.data));
}
setisRefresh(false);
};
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<FlatList <FlatList
keyExtractor={(item) => item.id} keyExtractor={(item) => item.transection_id}
refreshing={isRefresh}
onRefresh={onRefresh}
onEndReachedThreshold={0.01}
onEndReached={(info) => {
onLoadMore();
}}
data={data} data={data}
renderItem={({item}) => <Item item={item} />} renderItem={({item}) => <Item item={item} />}
/> />
......
...@@ -6,6 +6,7 @@ import TextField from '../../../components/Input/TextField'; ...@@ -6,6 +6,7 @@ import TextField from '../../../components/Input/TextField';
import TextMulti from '../../../components/Input/TextMulti'; import TextMulti from '../../../components/Input/TextMulti';
import TextDisable from '../../../components/Input/TextDisable'; import TextDisable from '../../../components/Input/TextDisable';
import {getFontXD, toPriceVnd} from '../../../Config/Functions'; import {getFontXD, toPriceVnd} from '../../../Config/Functions';
import {connect} from 'react-redux';
const {width} = Dimensions.get('window'); const {width} = Dimensions.get('window');
const WalletDeposit = (props) => { const WalletDeposit = (props) => {
...@@ -16,13 +17,23 @@ const WalletDeposit = (props) => { ...@@ -16,13 +17,23 @@ const WalletDeposit = (props) => {
<View style={styles.wrapTop}> <View style={styles.wrapTop}>
<View style={styles.itemTop}> <View style={styles.itemTop}>
<Text style={styles.txtTitle}>Ví</Text> <Text style={styles.txtTitle}>Ví</Text>
<Text style={styles.txtMoney}>{toPriceVnd(1000000)}</Text> <Text style={styles.txtMoney}>
{' '}
{props.user.current_money != 0
? toPriceVnd(props.user.current_money)
: 0}{' '}
</Text>
</View> </View>
<View style={{width: 1, backgroundColor: '#DBDBDB'}} /> <View style={{width: 1, backgroundColor: '#DBDBDB'}} />
<View style={styles.itemTop}> <View style={styles.itemTop}>
<Text style={styles.txtTitle}>CQG</Text> <Text style={styles.txtTitle}>CQG</Text>
<Text style={styles.txtMoney}>{toPriceVnd(1000000)}</Text> <Text style={styles.txtMoney}>
{' '}
{props.user.current_cqg_money != 0
? toPriceVnd(props.user.current_cqg_money)
: 0}{' '}
đ
</Text>
</View> </View>
</View> </View>
<View style={styles.wrapBody}> <View style={styles.wrapBody}>
...@@ -95,4 +106,9 @@ const styles = StyleSheet.create({ ...@@ -95,4 +106,9 @@ const styles = StyleSheet.create({
}, },
}); });
export default WalletDeposit; const mapStateToProps = (state) => {
return {
user: state.userReducer,
};
};
export default connect(mapStateToProps, {})(WalletDeposit);
...@@ -117,18 +117,29 @@ const WalletWithdraw = (props) => { ...@@ -117,18 +117,29 @@ const WalletWithdraw = (props) => {
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack title={'Rút tiền'} /> <HeaderBack title={'Rút tiền'} />
<View style={styles.container}> <View style={styles.container}>
{/* <View style={styles.wrapTop}> <View style={styles.wrapTop}>
<View style={styles.itemTop}> <View style={styles.itemTop}>
<Text style={styles.txtTitle}>Ví</Text> <Text style={styles.txtTitle}>Ví</Text>
<Text style={styles.txtMoney}>{toPriceVnd(1000000)}</Text> <Text style={styles.txtMoney}>
</View> {' '}
<View style={{width: 1, backgroundColor: '#DBDBDB'}} /> {props.user.current_money != 0
? toPriceVnd(props.user.current_money)
: 0}{' '}
</Text>
</View>
<View style={styles.itemTop}> <View style={{width: 1, backgroundColor: '#DBDBDB'}} />
<Text style={styles.txtTitle}>CQG</Text>
<Text style={styles.txtMoney}>{toPriceVnd(1000000)}</Text> <View style={styles.itemTop}>
</View> <Text style={styles.txtTitle}>CQG</Text>
</View> */} <Text style={styles.txtMoney}>
{props.user.current_cqg_money != 0
? toPriceVnd(props.user.current_cqg_money)
: 0}{' '}
đ
</Text>
</View>
</View>
<View style={styles.wrapBody}> <View style={styles.wrapBody}>
<Text <Text
style={{ style={{
......
import React from 'react';
import {View, Text} from 'react-native';
import HeaderBack from '../../components/Header/HeaderBack';
const LegalDocument = (props) => {
return (
<View style={{flex: 1}}>
<HeaderBack title={'Giấy tờ pháp lý'} />
</View>
);
};
export default LegalDocument;
...@@ -58,7 +58,7 @@ const NewFeed = (props) => { ...@@ -58,7 +58,7 @@ const NewFeed = (props) => {
const getItemLayout = (data, index) => ({ const getItemLayout = (data, index) => ({
length: 100, length: 100,
offset: 80 * index, offset: 60 * index,
index, index,
}); });
......
...@@ -27,11 +27,6 @@ const NewFeed = (props) => { ...@@ -27,11 +27,6 @@ const NewFeed = (props) => {
style: {backgroundColor: 'white'}, style: {backgroundColor: 'white'},
}}> }}>
<Tab.Screen <Tab.Screen
name="CALENDAR"
component={Calendar}
options={{tabBarLabel: 'Lịch thị trường'}}
/>
<Tab.Screen
name="Tab1" name="Tab1"
component={Tab1} component={Tab1}
options={{tabBarLabel: 'Tin tức'}} options={{tabBarLabel: 'Tin tức'}}
...@@ -51,6 +46,11 @@ const NewFeed = (props) => { ...@@ -51,6 +46,11 @@ const NewFeed = (props) => {
component={Trading} component={Trading}
options={{tabBarLabel: 'Biểu đồ'}} options={{tabBarLabel: 'Biểu đồ'}}
/> />
<Tab.Screen
name="CALENDAR"
component={Calendar}
options={{tabBarLabel: 'Lịch thị trường'}}
/>
</Tab.Navigator> </Tab.Navigator>
</View> </View>
</View> </View>
......
...@@ -24,10 +24,11 @@ const Item = (props) => { ...@@ -24,10 +24,11 @@ const Item = (props) => {
</View> </View>
<Block padding={[5, 10]} space={'between'} flex={1}> <Block padding={[5, 10]} space={'between'} flex={1}>
<View style={{justifyContent: 'center', flex: 1}}> <View style={{justifyContent: 'center', flex: 1}}>
<Text style={styles.txtBlack}>{item.content}</Text> <Text numberOfLines={2} style={styles.txtBlack}>
Np tin thành công vi s lượng: 750.000
</Text>
</View> </View>
<Text style={styles.txt}>10:52 09/04/2021</Text>
<Text style={styles.txt}>Ngày {item.time}</Text>
</Block> </Block>
</Block> </Block>
</View> </View>
......
...@@ -9,93 +9,73 @@ const Fillters = [ ...@@ -9,93 +9,73 @@ const Fillters = [
{ {
id: '1', id: '1',
name: 'Tất cả', name: 'Tất cả',
value: 'all', value: 'ALL',
}, },
{ {
id: '2', id: '2',
name: 'Chưa đọc',
value: 'disable',
},
{
id: '3',
name: 'Đã đọc',
value: 'enable',
},
{
id: '4',
name: 'Rút tiền',
value: 'withdraw',
},
{
id: '5',
name: 'Nạp tiền', name: 'Nạp tiền',
value: 'deposit', value: 'DEPOSIT',
},
{
id: '6',
name: 'Chuyển khoản',
value: 'exchange',
},
];
const data = [
{
id: '1',
time: '20/02/2021',
content: 'Yêu cầu nạp tiền của bạn đã đươc xác nhận',
},
{
id: '2',
time: '20/02/2021',
content: 'Yêu cầu nạp tiền của bạn đã đươc xác nhận',
}, },
{ {
id: '3', id: '3',
time: '20/02/2021', name: 'Rút tiền',
content: 'Yêu cầu nạp tiền của bạn đã đươc xác nhận', value: 'WITHDRAW',
}, },
{ {
id: '4', id: '4',
time: '20/02/2021', name: 'Chuyển khoản',
content: 'Yêu cầu nạp tiền của bạn đã đươc xác nhận', value: 'TRANSFER',
}, },
]; ];
const NotificaitonView = (props) => { const NotificaitonView = (props) => {
const [selected, setSelected] = useState('1'); const {onRefresh, isRefresh, onLoadMore, setFillters, fillter, data} = props;
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderDrawer isWhite={true} title={'Thông báo'} /> <HeaderDrawer isWhite={true} title={'Thông báo'} />
<View style={styles.headerContainer}> <View style={styles.headerContainer}>
<FlatList {Fillters.map((e) => (
showsHorizontalScrollIndicator={false} <TouchableOpacity
horizontal key={e.value}
data={Fillters} onPress={() => setFillters(e.value)}
keyExtractor={(item) => item.id} style={[
renderItem={({item}) => ( styles.itemFillter,
<TouchableOpacity fillter == e.value ? {borderColor: '#1473E6'} : null,
onPress={() => setSelected(item.id)} ]}>
<Text
style={[ style={[
styles.itemFillter, styles.txtFillter,
selected == item.id ? {borderColor: '#1473E6'} : null, fillter == e.value ? {color: '#1473E6'} : {},
]}> ]}>
<Text {e.name}
style={[ </Text>
styles.txtFillter, </TouchableOpacity>
selected == item.id ? {color: '#1473E6'} : {}, ))}
]}>
{item.name}
</Text>
</TouchableOpacity>
)}
/>
</View> </View>
<FlatList {data.length == 0 ? (
keyExtractor={(item) => item.id} <View style={{justifyContent: 'center', alignItems: 'center', flex: 1}}>
data={data} <Text
renderItem={({item}) => <Item item={item} />} style={{
/> fontSize: getFontXD(46),
fontWeight: 'bold',
}}>
Không có thông báo nào!
</Text>
</View>
) : (
<FlatList
keyExtractor={(item) => item.id}
data={data}
refreshing={isRefresh}
onRefresh={onRefresh}
onEndReachedThreshold={0.01}
onEndReached={(info) => {
onLoadMore();
}}
renderItem={({item}) => <Item item={item} />}
/>
)}
</View> </View>
); );
}; };
...@@ -104,6 +84,10 @@ const styles = StyleSheet.create({ ...@@ -104,6 +84,10 @@ const styles = StyleSheet.create({
headerContainer: { headerContainer: {
paddingVertical: 10, paddingVertical: 10,
backgroundColor: 'white', backgroundColor: 'white',
flexDirection: 'row',
justifyContent: 'space-around',
alignItems: 'center',
paddingHorizontal: 10,
}, },
itemFillter: { itemFillter: {
borderRadius: 10, borderRadius: 10,
...@@ -111,12 +95,18 @@ const styles = StyleSheet.create({ ...@@ -111,12 +95,18 @@ const styles = StyleSheet.create({
paddingHorizontal: 10, paddingHorizontal: 10,
borderWidth: 1, borderWidth: 1,
borderColor: '#929292', borderColor: '#929292',
marginLeft: 15, minWidth: 80,
minWidth: 70, justifyContent: 'center',
alignItems: 'center',
}, },
txtFillter: { txtFillter: {
fontSize: getFontXD(36), fontSize: getFontXD(36),
color: '#929292', color: '#929292',
fontWeight: 'bold',
},
txtTitle: {
fontSize: getFontXD(46),
fontWeight: 'bold',
}, },
}); });
......
import React from 'react'; import React, {useState, useEffect} from 'react';
import {getListNotification} from '../../apis/Functions/users';
import NotificationView from './NotificaitonView'; import NotificationView from './NotificaitonView';
const Notifcation = (props) => { const Notifcation = (props) => {
return <NotificationView />; const [selected, setSelected] = useState('');
const [page, setPage] = useState(1);
const [data, setData] = useState([]);
const [tottalPage, setTotalPage] = useState(1);
const [isRefresh, setisRefresh] = useState(false);
const [fillter, setFillters] = useState('ALL');
useEffect(() => {
getData();
}, [fillter]);
const getData = async () => {
setisRefresh(true);
setPage(1);
const res = await getListNotification({
keyword: '',
platform: Platform.OS,
page_size: 10,
page_index: 1,
type: fillter,
});
setisRefresh(false);
if ((res.data.code = 200 && res.data.data)) {
setData(res.data.data);
setTotalPage(res.data.meta.pages);
} else {
Alert.alert('Thông báo!', res.data.message);
}
};
const onRefresh = () => {
getData();
};
const onLoadMore = () => {
console.log(tottalPage);
if (page < tottalPage) getDataLoadMore();
};
const getDataLoadMore = async () => {
setisRefresh(true);
const res = await getListNotification({
keyword: '',
platform: Platform.OS,
page_size: 10,
page_index: 1,
type: fillter,
});
setPage(page + 1);
if (res.data.code == 200) {
setData(data.concat(res.data.data));
}
setisRefresh(false);
};
return (
<NotificationView
onRefresh={onRefresh}
isRefresh={isRefresh}
onLoadMore={onLoadMore}
setFillters={setFillters}
fillter={fillter}
data={data}
/>
);
}; };
export default Notifcation; export default Notifcation;
...@@ -41,3 +41,8 @@ export const getTransaction = async (body) => ...@@ -41,3 +41,8 @@ export const getTransaction = async (body) =>
GetData(url.urlGetTransaction, body) GetData(url.urlGetTransaction, body)
.then((res) => res) .then((res) => res)
.catch((err) => err); .catch((err) => err);
export const getListNotification = async (body) =>
GetData(url.urlGetListNotification, body)
.then((res) => res)
.catch((err) => err);
...@@ -27,4 +27,6 @@ export default { ...@@ -27,4 +27,6 @@ export default {
//History //History
urlGetListHistory: root + 'api/v1/customers/get-list-transaction-history', urlGetListHistory: root + 'api/v1/customers/get-list-transaction-history',
urlGetListNotification: root + 'api/v1/customers/get-list-notification',
}; };
...@@ -30,8 +30,8 @@ const images = { ...@@ -30,8 +30,8 @@ const images = {
iconMethodPay: require('./images/iconMethodPay1.png'), iconMethodPay: require('./images/iconMethodPay1.png'),
iconDepositNoti: require('./images/iconDeposit.png'), iconDepositNoti: require('./images/iconDeposit.png'),
iconRecharge: require('./images/iconRecharge.png'), iconRecharge: require('./images/iconRecharge1.png'),
iconWithdrawal: require('./images/iconWithdrawal.png'), iconWithdrawal: require('./images/iconWithdrawal2.png'),
iconClose: require('./images/CloseIcon.png'), iconClose: require('./images/CloseIcon.png'),
iconBack: require('./images/iconBack.png'), iconBack: require('./images/iconBack.png'),
bgBtn: require('./images/bgBtn.png'), bgBtn: require('./images/bgBtn.png'),
...@@ -63,6 +63,7 @@ const images = { ...@@ -63,6 +63,7 @@ const images = {
iconCheck: require('./images/iconCheck.png'), iconCheck: require('./images/iconCheck.png'),
bgmedia: require('./images/bgmedia.jpeg'), bgmedia: require('./images/bgmedia.jpeg'),
bgLogin: require('./images/bgLogin.png'), bgLogin: require('./images/bgLogin.png'),
iconPaper: require('./images/iconPaper.png'),
}; };
export default images; export default images;
...@@ -14,6 +14,7 @@ import { ...@@ -14,6 +14,7 @@ import {
AUTHEN, AUTHEN,
PROFILE, PROFILE,
CONTRACT, CONTRACT,
LEGALDOCUMENT,
} 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';
...@@ -51,6 +52,12 @@ const menus = [ ...@@ -51,6 +52,12 @@ const menus = [
screen: FEEDBACK, screen: FEEDBACK,
}, },
{ {
id: '7',
title: 'Giấy tờ pháp lý',
icon: R.images.iconPaper,
screen: LEGALDOCUMENT,
},
{
id: '5', id: '5',
title: 'Cài đặt', title: 'Cài đặt',
icon: R.images.iconSetting, icon: R.images.iconSetting,
......
...@@ -58,3 +58,5 @@ export const WALLETWITHDRAW = 'WALLETWITHDRAW'; ...@@ -58,3 +58,5 @@ export const WALLETWITHDRAW = 'WALLETWITHDRAW';
export const PACKETCQG = 'PACKETCQG'; export const PACKETCQG = 'PACKETCQG';
export const MEDIADETAIL = 'MEDIADETAIL'; export const MEDIADETAIL = 'MEDIADETAIL';
export const METHODPAYDETAIL = 'METHODPAYDETAIL'; export const METHODPAYDETAIL = 'METHODPAYDETAIL';
export const LEGALDOCUMENT = 'LEGALDOCUMENT';
...@@ -39,6 +39,7 @@ import WalletWithdraw from '../Screens/Action/Wallet/WalletWithdraw'; ...@@ -39,6 +39,7 @@ import WalletWithdraw from '../Screens/Action/Wallet/WalletWithdraw';
import PacketCQG from '../Screens/Account/PacrtCQG/PacketCQG'; import PacketCQG from '../Screens/Account/PacrtCQG/PacketCQG';
import MediaDetail from '../Screens/NewFeed/Media/MediaDetail'; import MediaDetail from '../Screens/NewFeed/Media/MediaDetail';
import MethodPayDetail from '../Screens/MethodPay/MethodPayDetail'; import MethodPayDetail from '../Screens/MethodPay/MethodPayDetail';
import LegaDocument from '../Screens/LegalDocument/LegalDocument';
import * as ScreenName from './ScreenNames'; import * as ScreenName from './ScreenNames';
...@@ -57,6 +58,7 @@ function MyStack(props) { ...@@ -57,6 +58,7 @@ function MyStack(props) {
headerMode={'none'} headerMode={'none'}
initialRouteName={ScreenName.AUTHEN}> initialRouteName={ScreenName.AUTHEN}>
<Stack.Screen name={ScreenName.LOGINSCREEN} component={Login} /> <Stack.Screen name={ScreenName.LOGINSCREEN} component={Login} />
<Stack.Screen name={ScreenName.LEGALDOCUMENT} component={LegaDocument} />
<Stack.Screen name={ScreenName.NOTIFICATION} component={Notification} /> <Stack.Screen name={ScreenName.NOTIFICATION} component={Notification} />
<Stack.Screen name={ScreenName.MEDIADETAIL} component={MediaDetail} /> <Stack.Screen name={ScreenName.MEDIADETAIL} component={MediaDetail} />
<Stack.Screen name={ScreenName.TABNAVIGATOR} component={TabNavigator} /> <Stack.Screen name={ScreenName.TABNAVIGATOR} component={TabNavigator} />
......
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