-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
45 lines (42 loc) · 1.34 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow strict-local
*/
import React, { Node, useEffect } from 'react';
import { BackHandler } from "react-native";
import Source from './Source';
import { handleLocationPermission } from './Source/Helper/FunctionCommon';
import { getCurrentRoute, reset } from './Source/Helper/RootNavigation';
import { networkListener } from './Source/Services/notificationService';
const App: () => Node = () => {
// const userReducer = store.getState().userReducer;
// function handleBackPress() {
// const route = getCurrentRoute();
// console.log('route', route)
// if ((route.name == 'DetailPoint' || route.name == 'UpdateStorePoint' || route.name == 'UpdateReliefPoint' || route.name == 'SOS') && route.params?.from == "MapCluser") {
// reset('MapCluser');
// return true
// }
// return false;
// }
// const onBackPress = (callback) => {
// BackHandler.addEventListener('hardwareBackPress', callback);
// return () => {
// BackHandler.removeEventListener('hardwareBackPress', callback);
// };
// };
useEffect(() => {
networkListener();
handleLocationPermission().then((e) => {
console.log("permission", e);
});
// onBackPress(handleBackPress);
}, [])
return (
<Source />
)
};
export default App;