2019-06-16 13:09:54 +00:00
/ * *
* Sample React Native App
* https : //github.com/facebook/react-native
*
* @ format
* @ flow
* /
2020-03-20 18:28:22 +00:00
import React , { Component } from 'react' ;
2020-08-11 09:42:31 +00:00
import { ActionSheetProvider , connectActionSheet } from '@expo/react-native-action-sheet'
import { Platform , StyleSheet , Text , View , YellowBox , AsyncStorage } from 'react-native' ;
2020-10-07 11:25:20 +00:00
import { createAppContainer , HeaderBackButton , createSwitchNavigator , createStackNavigator , createBottomTabNavigator , createDrawerNavigator } from 'react-navigation' ;
2020-08-11 09:42:31 +00:00
import OneSignal from 'react-native-onesignal' ;
import _ from 'lodash' ;
2019-06-16 13:09:54 +00:00
import Connect from "./screens/login/Connect" ;
import SplashScreen from "./screens/splashscreen/SplashScreen" ;
import HelpMenu from "./screens/help/HelpMenu" ;
import Help from "./screens/help/Help" ;
import ForgottenPassword from "./screens/login/ForgottenPassword" ;
import TypeChoiser from "./screens/login/TypeChoiser" ;
import CreateUserStep2 from "./screens/login/createUserStep2" ;
import createAccount from "./screens/login/createAccount" ;
import UpdateInformations from "./screens/account/UpdateInformations" ;
import UserAccount from "./screens/account/UserAccount" ;
import ActivateAccount from "./screens/login/ActivateAccount" ;
import Notifications from "./screens/notifications/Notifications" ;
import About from "./screens/configurations/About" ;
import Configurations from "./screens/configurations/Configurations" ;
import History from './screens/history-request/History'
import OptionsMenu from "./screens/optionMenu/OptionsMenu" ;
import Home from "./screens/home/Home" ;
import HistoryItemDetails from "./screens/history-request/HistoryItemDetails" ;
import SuperViseurGroupeHome from "./screens/groupes/SuperViseurGroupeHome" ;
import HistoryRequester from "./screens/history-request/HistoryRequester" ;
import AddNetwork from "./screens/account/AddNetwork" ;
import MyHistory from "./screens/history-request/MyHistory" ;
import Icon from "react-native-vector-icons/FontAwesome5" ;
import { Appbar } from 'react-native-paper' ;
import IconWithBadge from "./screens/IconWithBadge"
import I18n from "react-native-i18n" ;
import Filter from './screens/home/Filter' ;
import { createMaterialBottomTabNavigator } from 'react-navigation-material-bottom-tabs' ;
2020-04-17 22:03:04 +00:00
import WalletDetail from './screens/wallet/WalletDetail' ;
import WalletSelect from './screens/wallet/WalletSelect' ;
import { PersistGate } from 'redux-persist/integration/react' ;
import { store , persistor } from './redux/store' ;
2020-08-11 09:42:31 +00:00
import { Provider , connect } from 'react-redux' ;
2020-04-24 15:11:08 +00:00
import WalletDepot from './screens/wallet/WalletDepot' ;
import WalletRetrait from './screens/wallet/WalletRetrait' ;
2020-05-30 21:58:22 +00:00
import CreateIdentification from './screens/identification/createIdentification' ;
import WalletDetailUser from './screens/wallet/WalletDetailUser' ;
2020-06-02 09:05:50 +00:00
import WalletOptionSelect from './screens/wallet/WalletOptionSelect' ;
2020-06-10 03:10:45 +00:00
import ValidateIdentification from './screens/identification/validateIdentification' ;
2020-06-16 09:25:46 +00:00
import CreateIdentificationUser from './screens/identification/CreateIdentificationUser' ;
2020-06-18 05:38:10 +00:00
import OperateurOptionSelect from './screens/wallet/OperateurOptionSelect' ;
import PaiementFacture from './screens/wallet/PaiementFacture' ;
2020-06-23 08:55:19 +00:00
import EnvoieWalletToWalletUser from './screens/wallet/user/EnvoieWalletToWalletUser' ;
2020-06-23 10:28:52 +00:00
import EnvoieWalletToCashUser from './screens/wallet/user/EnvoieWalletToCash' ;
2020-07-02 14:35:00 +00:00
import LinkCard from './screens/wallet/user/LinkCard' ;
import EnvoieWalletToCardUser from './screens/wallet/user/EnvoieWalletToCardUser' ;
import EnvoieWalletToBankUser from './screens/wallet/user/EnvoieWalletToBankUser' ;
import RetraitWalletVersCashUser from './screens/wallet/user/RetraitWalletVersCashUser' ;
import RetraitCarteVersCashUser from './screens/wallet/user/RetraitCarteVersCashUser' ;
import RetraitCarteVersWalletUser from './screens/wallet/user/RetraitCarteVersWalletUser' ;
2020-07-04 17:38:39 +00:00
import RetraitEnCashAgent from './screens/wallet/agent/RetraitEnCashAgent' ;
import RetraitCarteVersCashAgent from './screens/wallet/agent/RetraitCarteVersCashAgent' ;
import EnvoieCashVersWalletAgent from './screens/wallet/agent/EnvoieCashVersWalletAgent' ;
import EnvoieCashVersAutreWalletAgent from './screens/wallet/agent/EnvoieCashVersAutreWalletAgent' ;
2020-07-08 19:01:56 +00:00
import EnvoieCashVersCarteAgent from './screens/wallet/agent/EnvoieCashVersCarteAgent' ;
import EnvoiCashVersCashAgent from './screens/wallet/agent/EnvoiCashVersCashAgent' ;
2020-08-11 09:42:31 +00:00
import ModifyIdentificationUser from './screens/identification/ModifyIdentificationUser' ;
import CreateGroupNanoCredit from './screens/nano-credit/CreateGroupNanoCredit' ;
import { bindActionCreators } from 'redux' ;
import DemandValidationGroup from './screens/nano-credit/DemandGroupNanoCredit' ;
2020-08-13 07:23:23 +00:00
import DemandGroupNanoCreditDetail from './screens/nano-credit/DemandGroupNanoCreditDetail' ;
2020-08-17 05:25:16 +00:00
import NavigationService from './utils/NavigationService' ;
2020-08-19 06:25:24 +00:00
import AdhererGroupNanoCredit from './screens/nano-credit/AdhererGroupNanoCredit' ;
2020-08-23 21:41:29 +00:00
import MyNanoCreditGroup from './screens/nano-credit/MyNanoCreditGroup' ;
2020-08-27 20:04:51 +00:00
import AskNanoCredit from './screens/nano-credit/AskNanoCredit' ;
2020-09-07 16:10:48 +00:00
import RefundNanoCreditUser from './screens/nano-credit/RefundNanoCreditUser' ;
import CautionNanoCreditAgent from './screens/nano-credit/CautionNanoCreditAgent' ;
import EpargnerArgentUser from './screens/nano-credit/EpargnerArgentUser' ;
import CasserEpargneUser from './screens/nano-credit/CasserEpargneUser' ;
2020-09-15 13:53:59 +00:00
import { IlinkEmitter } from './utils/events' ;
2020-09-30 05:46:30 +00:00
import { fromBottom , fromLeft , zoomIn } from 'react-navigation-transitions' ;
2020-10-04 14:41:26 +00:00
import { readUser } from './webservice/AuthApi' ;
2020-09-30 05:46:30 +00:00
2020-04-18 19:59:05 +00:00
2019-06-16 13:09:54 +00:00
const instructions = Platform . select ( {
2020-03-20 18:28:22 +00:00
ios : 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu' ,
android :
'Double tap R on your keyboard to reload,\n' +
'Shake or press menu button for dev menu' ,
2019-06-16 13:09:54 +00:00
} ) ;
2020-03-20 18:28:22 +00:00
const theme = require ( "./utils/theme" )
const AuthStack = createStackNavigator ( {
login : Connect ,
helpMenu : HelpMenu ,
help : Help ,
forgottenpass : ForgottenPassword ,
typeaccountcreate : TypeChoiser ,
simpleusercreate : createAccount ,
step2 : CreateUserStep2 ,
activateaccout : ActivateAccount
} , {
headerMode : 'none'
} )
const AppStack = createDrawerNavigator ( {
sta : createStackNavigator ( {
home : Home ,
/ * f i l t r e : F i l t e r ,
network : Networks , * /
useraccount : {
screen : UserAccount ,
navigationOptions : {
} ,
} ,
2020-05-30 21:58:22 +00:00
walletSelect : WalletSelect ,
2020-06-16 09:25:46 +00:00
createIdentificationUser : CreateIdentificationUser ,
2020-08-11 09:42:31 +00:00
modifyIdentificationUser : ModifyIdentificationUser ,
2020-03-20 18:28:22 +00:00
notificationview : Notifications ,
configuration : Configurations ,
2020-05-30 21:58:22 +00:00
about : About ,
2020-06-02 09:05:50 +00:00
walletDetailUser : WalletDetailUser ,
2020-06-17 14:09:27 +00:00
walletOptionSelect : WalletOptionSelect ,
2020-06-18 05:38:10 +00:00
operateurOptionSelect : OperateurOptionSelect ,
operateurOptionSelect : OperateurOptionSelect ,
2020-06-23 08:55:19 +00:00
paiementFacture : PaiementFacture ,
2020-06-23 10:28:52 +00:00
envoieWalletToWalletUser : EnvoieWalletToWalletUser ,
2020-07-02 14:35:00 +00:00
envoieWalletToCashUser : EnvoieWalletToCashUser ,
envoieWalletToCardUser : EnvoieWalletToCardUser ,
envoieWalletToBankUser : EnvoieWalletToBankUser ,
retraitWalletVersCashUser : RetraitWalletVersCashUser ,
retraitCarteVersCashUser : RetraitCarteVersCashUser ,
retraitCarteVersWalletUser : RetraitCarteVersWalletUser ,
2020-08-11 09:42:31 +00:00
linkCard : LinkCard ,
2020-09-30 05:46:30 +00:00
epargnerArgentUser : EpargnerArgentUser ,
2020-08-11 09:42:31 +00:00
createGroupNanoCredit : CreateGroupNanoCredit ,
groupNanoCredit : {
screen : createBottomTabNavigator ( {
2020-08-24 19:18:19 +00:00
demandeValidationGroupe : {
screen : DemandValidationGroup ,
navigationOptions : {
tabBarLabel : I18n . t ( 'DEMAND_VALIDATION_GROUP_RECEIVE' ) ,
tabBarIcon : ( { focused , horizontal , tintColor } ) => {
return ( < IconWithBadge
badgeCount = { 0 }
size = { 20 }
name = { "account-multiple-plus" }
color = { focused ? tintColor : "grey" }
/ > )
}
}
} ,
myNanoCreditGroup : {
screen : MyNanoCreditGroup ,
navigationOptions : {
tabBarLabel : I18n . t ( 'MY_GROUP' ) ,
tabBarIcon : ( { focused , horizontal , tintColor } ) => {
return ( < IconWithBadge
badgeCount = { 0 }
size = { 20 }
name = { "account-multiple" }
color = { focused ? tintColor : "grey" }
/ > )
}
}
} ,
2020-08-11 09:42:31 +00:00
} , {
headerMode : "none" ,
header : null ,
headerTitle : null ,
title : I18n . t ( 'MANAGE_GROUP' ) ,
tabBarOptions : {
labelStyle : {
fontSize : 13 ,
} ,
}
} ) ,
2020-08-19 03:53:12 +00:00
navigationOptions : ( ) => ( {
2020-08-11 09:42:31 +00:00
header : null ,
headerMode : 'none' ,
headerTitle : null ,
activeColor : '#f0edf6' ,
inactiveColor : '#3e2465' ,
barStyle : { backgroundColor : '#694fad' } ,
drawerLabel : I18n . t ( 'MANAGE_GROUP' ) ,
drawerIcon : ( { tintColor } ) => (
< Icon
name = { 'account-multiple' }
size = { 24 }
/ > )
} ) ,
} ,
2020-08-19 06:25:24 +00:00
demandeValidationGroupe : DemandGroupNanoCreditDetail ,
2020-08-27 20:04:51 +00:00
adhererGroupNanoCredit : AdhererGroupNanoCredit ,
2020-09-07 16:10:48 +00:00
askNanoCredit : AskNanoCredit ,
refundNanoCreditUser : RefundNanoCreditUser ,
casserEpargneUser : CasserEpargneUser
2020-03-20 18:28:22 +00:00
} )
2020-09-30 05:46:30 +00:00
} , {
contentComponent : OptionsMenu ,
headerMode : 'none' ,
contentOptions : { activeTintColor : theme . accent }
} )
2020-04-11 22:33:59 +00:00
2020-03-20 18:28:22 +00:00
const AppAgentStack = createDrawerNavigator ( {
sta : createStackNavigator ( {
home : Home ,
useraccount : UserAccount ,
2020-04-24 15:11:08 +00:00
walletSelect : WalletSelect ,
2020-05-30 21:58:22 +00:00
createIdentification : CreateIdentification ,
2020-06-10 03:10:45 +00:00
validateIdentification : ValidateIdentification ,
2020-03-20 18:28:22 +00:00
Historique :
{
screen : createBottomTabNavigator ( { myDemand : MyHistory } , {
headerMode : "none" ,
header : null ,
headerTitle : null ,
headerTitle : I18n . t ( 'CREDIT_MANAGE' ) ,
tabBarOptions : {
labelStyle : {
fontSize : 13 ,
fontWeight : "bold"
} ,
}
} ) ,
2020-08-19 03:53:12 +00:00
navigationOptions : ( ) => ( {
2020-03-20 18:28:22 +00:00
header : null ,
headerMode : 'none' ,
headerTitle : null ,
activeColor : '#f0edf6' ,
inactiveColor : '#3e2465' ,
barStyle : { backgroundColor : '#694fad' } ,
2020-10-04 11:17:41 +00:00
/* headerLeft: (<HeaderBackButton />), */
2020-03-20 18:28:22 +00:00
drawerLabel : I18n . t ( 'CREDIT_MANAGE' ) ,
drawerIcon : ( { tintColor } ) => (
< Icon
name = { 'credit-card' }
size = { 24 }
/ > )
} ) ,
} ,
historyItemDetails : HistoryItemDetails ,
creditrequest : HistoryRequester ,
addNetwork : AddNetwork ,
updateinformation : UpdateInformations ,
notificationview : Notifications ,
configuration : Configurations ,
2020-04-17 22:03:04 +00:00
about : About ,
2020-04-24 15:11:08 +00:00
walletDetail : WalletDetail ,
walletDepot : WalletDepot ,
2020-06-02 09:05:50 +00:00
walletRetrait : WalletRetrait ,
2020-06-17 14:09:27 +00:00
walletOptionSelect : WalletOptionSelect ,
2020-06-18 05:38:10 +00:00
operateurOptionSelect : OperateurOptionSelect ,
2020-07-04 17:38:39 +00:00
paiementFacture : PaiementFacture ,
retraitEnCashAgent : RetraitEnCashAgent ,
retraitCarteVersCashAgent : RetraitCarteVersCashAgent ,
envoieCashVersWalletAgent : EnvoieCashVersWalletAgent ,
2020-07-08 19:01:56 +00:00
envoieCashVersAutreWalletAgent : EnvoieCashVersAutreWalletAgent ,
envoieCashVersCarteAgent : EnvoieCashVersCarteAgent ,
envoiCashVersCashAgent : EnvoiCashVersCashAgent ,
2020-09-07 16:10:48 +00:00
createGroupNanoCredit : CreateGroupNanoCredit ,
cautionNanoCreditAgent : CautionNanoCreditAgent ,
2020-03-20 18:28:22 +00:00
} )
} , {
contentComponent : OptionsMenu ,
backBehavior : "none" ,
lazy : false ,
headerMode : 'none' , contentOptions : { activeTintColor : theme . accent }
2020-08-11 09:42:31 +00:00
} ) ;
2020-03-20 18:28:22 +00:00
const AppAdministratorStack = createDrawerNavigator ( {
sta : createStackNavigator ( {
home : Home ,
useraccount : UserAccount ,
2020-04-24 15:11:08 +00:00
walletSelect : WalletSelect ,
2020-03-20 18:28:22 +00:00
Historique : {
screen : createBottomTabNavigator ( {
myDemand : MyHistory , OthersDemand : MyHistory
} , {
headerMode : "none" ,
header : null ,
headerTitle : null ,
title : I18n . t ( 'CREDIT_MANAGE' ) ,
tabBarOptions : {
labelStyle : {
fontSize : 13 ,
} ,
}
} ) ,
2020-08-19 03:53:12 +00:00
navigationOptions : ( ) => ( {
2020-03-20 18:28:22 +00:00
header : null ,
headerMode : 'none' ,
headerTitle : null ,
activeColor : '#f0edf6' ,
inactiveColor : '#3e2465' ,
barStyle : { backgroundColor : '#694fad' } ,
drawerLabel : I18n . t ( 'CREDIT_MANAGE' ) ,
drawerIcon : ( { tintColor } ) => (
< Icon
name = { 'credit-card' }
size = { 24 }
/ > )
} ) ,
} ,
creditrequest : HistoryRequester ,
historyItemDetails : HistoryItemDetails ,
superviseurgroup : SuperViseurGroupeHome ,
notificationview : Notifications ,
configuration : Configurations ,
2020-04-17 22:03:04 +00:00
about : About ,
2020-04-24 15:11:08 +00:00
walletDetail : WalletDetail ,
walletDepot : WalletDepot ,
walletRetrait : WalletRetrait
2020-03-20 18:28:22 +00:00
} )
} ,
{
contentComponent : OptionsMenu ,
backBehavior : "none" ,
headerMode : 'none'
2020-08-11 09:42:31 +00:00
} ) ;
2020-03-20 18:28:22 +00:00
const AppSuperAdministrator = createDrawerNavigator ( {
sta : createStackNavigator ( {
home : Home ,
useraccount : UserAccount ,
2020-04-24 15:11:08 +00:00
walletSelect : WalletSelect ,
2020-03-20 18:28:22 +00:00
Historique : {
screen : createBottomTabNavigator ( { OthersDemand : MyHistory } , {
headerMode : "none" ,
header : null ,
headerTitle : null ,
title : I18n . t ( 'CREDIT_MANAGE' ) ,
tabBarOptions : {
labelStyle : {
fontSize : 13 ,
fontWeight : "bold"
} ,
}
} ) ,
2020-08-19 03:53:12 +00:00
navigationOptions : ( ) => ( {
2020-03-20 18:28:22 +00:00
title : I18n . t ( 'CREDIT_MANAGE' ) ,
headerMode : "none" ,
header : null ,
headerTitle : null ,
drawerIcon : ( { tintColor } ) => (
< Icon
name = { 'credit-card' }
size = { 24 }
/ > )
} ) ,
} ,
creditrequest : HistoryRequester ,
historyItemDetails : HistoryItemDetails ,
superviseurgroup : SuperViseurGroupeHome ,
notificationview : Notifications ,
configuration : Configurations ,
2020-04-17 22:03:04 +00:00
about : About ,
2020-04-24 15:11:08 +00:00
walletDetail : WalletDetail ,
walletDepot : WalletDepot ,
walletRetrait : WalletRetrait
2020-03-20 18:28:22 +00:00
} )
} , {
contentComponent : OptionsMenu ,
backBehavior : "none" ,
headerMode : 'none'
2020-08-11 09:42:31 +00:00
} ) ;
2020-03-20 18:28:22 +00:00
export const AppNavigator = createSwitchNavigator ( {
first : {
screen : SplashScreen
} ,
App : AppStack ,
AgentApp : AppAgentStack ,
adminApp : AppAdministratorStack ,
supAdminApp : AppSuperAdministrator ,
Auth : AuthStack
} , {
2020-09-30 05:46:30 +00:00
initialRouteName : 'first'
2019-06-16 13:09:54 +00:00
} ) ;
const AppContainer = createAppContainer ( AppNavigator ) ;
2020-04-17 22:03:04 +00:00
class App extends React . Component {
2020-04-18 19:59:05 +00:00
2020-08-19 03:53:12 +00:00
constructor ( props ) {
super ( props ) ;
2020-08-17 21:16:31 +00:00
console . log ( "APP PROPS" , this . props ) ;
2020-09-30 05:46:30 +00:00
global . appHasLoaded = false ;
2020-08-11 09:42:31 +00:00
//Remove this method to stop OneSignal Debugging
OneSignal . setLogLevel ( 6 , 0 ) ;
// Replace 'YOUR_ONESIGNAL_APP_ID' with your OneSignal App ID.
OneSignal . init ( "e8e7251f-713d-4658-9510-86d877fa6a7c" , { kOSSettingsKeyAutoPrompt : false , kOSSettingsKeyInAppLaunchURL : false , kOSSettingsKeyInFocusDisplayOption : 2 } ) ;
OneSignal . inFocusDisplaying ( 2 ) ; // Controls what should happen if a notification is received while the app is open. 2 means that the notification will go directly to the device's notification center.
// The promptForPushNotifications function code will show the iOS push notification prompt. We recommend removing the following code and instead using an In-App Message to prompt for notification permission (See step below)
OneSignal . promptForPushNotificationsWithUserResponse ( myiOSPromptCallback ) ;
OneSignal . addEventListener ( 'received' , this . onReceived ) ;
OneSignal . addEventListener ( 'opened' , this . onOpened ) ;
OneSignal . addEventListener ( 'ids' , this . onIds ) ;
}
_getOneSignalIds = ( ) => {
return new Promise ( async ( resolve , reject ) => {
try {
const getElement = await AsyncStorage . getItem ( '@config:onesignalIds' ) ;
resolve ( getElement ) ;
} catch ( error ) {
reject ( error ) ;
}
} ) ;
}
_saveOneSignalIds = async ( ids ) => {
try {
await AsyncStorage . setItem ( '@config:onesignalIds' , ids ) ;
} catch ( error ) {
console . warn ( error ) ;
}
}
2020-08-19 06:25:24 +00:00
goToScreen = ( routeName , params , isReset = true ) => {
const { navigator } = this . refs ;
2020-10-17 19:42:00 +00:00
if ( typeof navigator !== 'undefined' ) {
2020-10-04 14:41:26 +00:00
console . log ( "APP HAS LOADED" , global . appHasLoaded ) ;
if ( global . appHasLoaded ) {
2020-10-17 19:42:00 +00:00
navigator . dispatch ( {
type : "Navigation/NAVIGATE" ,
routeName ,
params
} ) ;
/ * r e a d U s e r ( ) . t h e n ( ( r e s u l t ) = > {
2020-10-04 14:41:26 +00:00
if ( result === null || result === undefined ) {
2020-10-17 19:42:00 +00:00
console . warn ( "APP HAS LOADED NOTIFICATION PARAMS" , params ) ;
2020-10-04 14:41:26 +00:00
navigator . dispatch ( {
type : "Navigation/NAVIGATE" ,
routeName : "first" ,
params : { routeName , params }
} ) ;
} else {
navigator . dispatch ( {
type : "Navigation/NAVIGATE" ,
routeName ,
params
} ) ;
}
2020-10-17 19:42:00 +00:00
} ) ; * /
2020-10-04 14:41:26 +00:00
} else {
navigator . dispatch ( {
type : "Navigation/NAVIGATE" ,
routeName : "first" ,
params : { routeName , params }
} ) ;
}
2020-10-04 11:17:41 +00:00
}
2020-08-19 06:25:24 +00:00
} ;
handleDeepLink = ( openResult ) => {
const data = openResult . notification . payload . additionalData ;
2020-09-30 05:46:30 +00:00
//const dataParse = data.replace("'", "\"");
console . warn ( "HANDLE DEEP LINK" , data ) ;
2020-10-17 19:42:00 +00:00
switch ( data . screen ) {
case 'historyItemDetails' :
console . log ( "History Item" ) ;
this . goToScreen ( data . screen , {
item : data . data
} ) ;
break ;
default :
console . log ( "Not History Item" ) ;
this . goToScreen ( data . screen , {
id : data . data . id
} ) ;
break ;
}
2020-08-19 06:25:24 +00:00
/ * i f ( d a t a & & d a t a . i d ) {
this . goToScreen ( data . screen , {
id : data . id ,
goToScreen : this . goToScreen
} ) ;
} else {
console . log ( "notification is invalid data" ) ;
} * /
} ;
2020-08-11 09:42:31 +00:00
componentWillUnmount ( ) {
OneSignal . removeEventListener ( 'received' , this . onReceived ) ;
OneSignal . removeEventListener ( 'opened' , this . onOpened ) ;
OneSignal . removeEventListener ( 'ids' , this . onIds ) ;
}
onReceived ( notification ) {
console . log ( "Notification received: " , notification ) ;
}
2020-08-19 06:25:24 +00:00
onOpened = ( openResult ) => {
2020-08-13 07:23:23 +00:00
let data = openResult . notification . payload . additionalData ;
2020-08-19 06:25:24 +00:00
this . handleDeepLink ( openResult ) ;
2020-08-11 09:42:31 +00:00
console . log ( 'Message: ' , openResult . notification . payload . body ) ;
console . log ( 'Data: ' , openResult . notification . payload . additionalData ) ;
console . log ( 'isActive: ' , openResult . notification . isAppInFocus ) ;
console . log ( 'openResult: ' , openResult ) ;
}
2020-04-17 22:03:04 +00:00
render ( ) {
return (
< Provider store = { store } >
2020-04-18 19:59:05 +00:00
< PersistGate persistor = { persistor } >
2020-08-11 09:42:31 +00:00
< ActionSheetProvider >
2020-08-17 05:25:16 +00:00
< AppContainer ref = "navigator" / >
2020-08-11 09:42:31 +00:00
< / A c t i o n S h e e t P r o v i d e r >
2020-04-17 22:03:04 +00:00
< / P e r s i s t G a t e >
< / P r o v i d e r >
) ;
}
}
2020-08-11 09:42:31 +00:00
function myiOSPromptCallback ( permission ) {
// do something with permission value
}
2020-04-17 22:03:04 +00:00
export default App ;
2019-06-16 13:09:54 +00:00
const styles = StyleSheet . create ( {
2020-03-20 18:28:22 +00:00
container : {
flex : 1 ,
justifyContent : 'center' ,
alignItems : 'center' ,
backgroundColor : '#F5FCFF' ,
} ,
welcome : {
fontSize : 20 ,
textAlign : 'center' ,
margin : 10 ,
} ,
instructions : {
textAlign : 'center' ,
color : '#333333' ,
marginBottom : 5 ,
} ,
2019-06-16 13:09:54 +00:00
} ) ;