66 lines
2.1 KiB
JavaScript
66 lines
2.1 KiB
JavaScript
import React, { useEffect } from 'react';
|
|
import moment from 'moment';
|
|
import AsyncStorage from '@react-native-community/async-storage';
|
|
import { StyleSheet, ScrollView, View, Text, StatusBar } from 'react-native';
|
|
import { SafeAreaProvider } from 'react-native-safe-area-context';
|
|
import 'react-native-gesture-handler';
|
|
import Router from './router';
|
|
import { configure } from "mobx"
|
|
import { Provider } from 'mobx-react';
|
|
import Store from './src/stores/index';
|
|
import { colors } from './src/assets/styles/colors-theme';
|
|
import { NavigationContainer, useFocusEffect } from '@react-navigation/native';
|
|
import { createStackNavigator, HeaderBackButton } from '@react-navigation/stack';
|
|
import { createMaterialBottomTabNavigator } from '@react-navigation/material-bottom-tabs';
|
|
import { LogBox } from 'react-native';
|
|
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
|
|
import {
|
|
Header,
|
|
LearnMoreLinks,
|
|
Colors,
|
|
DebugInstructions,
|
|
ReloadInstructions,
|
|
} from 'react-native/Libraries/NewAppScreen';
|
|
import NetInfo from "@react-native-community/netinfo";
|
|
import { NotifierWrapper } from 'react-native-notifier';
|
|
|
|
const App: () => React$Node = () => {
|
|
configure({
|
|
enforceActions: "never",
|
|
})
|
|
LogBox.ignoreLogs(['Warning: ...']); // Ignore log notification by message
|
|
LogBox.ignoreAllLogs();//Ignore all log notifications
|
|
NetInfo.addEventListener(networkState => {
|
|
Store.appStore.networkConnect(networkState)
|
|
});
|
|
return (
|
|
<>
|
|
<Provider {...Store}>
|
|
|
|
<SafeAreaProvider>
|
|
<StatusBar
|
|
animated={true}
|
|
barStyle={'dark-content'}
|
|
backgroundColor={'black'}
|
|
translucent={true}
|
|
/>
|
|
<NotifierWrapper>
|
|
|
|
<NavigationContainer
|
|
onStateChange={state => Store.appStore.setRouterState(state)}
|
|
ref={navigatorRef => Store.appStore.setRouterRef(navigatorRef)}
|
|
>
|
|
<Router />
|
|
</NavigationContainer>
|
|
</NotifierWrapper>
|
|
</SafeAreaProvider>
|
|
</Provider>
|
|
</>
|
|
);
|
|
};
|
|
const styles = StyleSheet.create({
|
|
|
|
});
|
|
|
|
export default App;
|