import React , { FunctionComponent } from "react" ; import { StoreProvider } from "./stores" ; import { StyleProvider } from "./styles" ; import { AppNavigation } from "./navigation" ; import { IntlProvider } from "react-intl" ; import { ModalsProvider } from "./modals/base" ; import { Platform , StatusBar } from "react-native" ; import codePush from "react-native-code-push" ; import { InteractionModalsProivder } from "./providers/interaction-modals-provider" ; import { SafeAreaProvider } from "react-native-safe-area-context" ; import { LoadingScreenProvider } from "./providers/loading-screen" ; import * as SplashScreen from "expo-splash-screen" ; import { ConfirmModalProvider } from "./providers/confirm-modal" ; if ( Platform . OS === "android" ) { require ( "@formatjs/intl-getcanonicallocales/polyfill" ) ; require ( "@formatjs/intl-locale/polyfill" ) ; require ( "@formatjs/intl-pluralrules/polyfill" ) ; require ( "@formatjs/intl-pluralrules/locale-data/en.js" ) ; require ( "@formatjs/intl-displaynames/polyfill" ) ; require ( "@formatjs/intl-displaynames/locale-data/en.js" ) ; require ( "@formatjs/intl-numberformat/polyfill" ) ; require ( "@formatjs/intl-numberformat/locale-data/en.js" ) ; require ( "@formatjs/intl-relativetimeformat/polyfill" ) ; require ( "@formatjs/intl-relativetimeformat/locale-data/en.js" ) ; require ( "@formatjs/intl-datetimeformat/polyfill" ) ; require ( "@formatjs/intl-datetimeformat/locale-data/en.js" ) ; require ( "@formatjs/intl-datetimeformat/add-golden-tz.js" ) ; } SplashScreen . preventAutoHideAsync ( ) . then ( ( result ) => console . log ( `SplashScreen.preventAutoHideAsync() succeeded: ${ result }` ) ) . catch ( console . warn ) ; const AppBody = ( ) => { return ( < StyleProvider > < StoreProvider > < IntlProvider locale = "en" formats = { { date : { en : { month : "short" , day : "2-digit" , hour : "2-digit" , hour12 : false , minute : "2-digit" , timeZoneName : "short" , } , } , } } > < StatusBar translucent = { true } backgroundColor = "#FFFFFF00" barStyle = "dark-content" / > < SafeAreaProvider > < ModalsProvider > < LoadingScreenProvider > < ConfirmModalProvider > < InteractionModalsProivder > < AppNavigation /> < /InteractionModalsProivder> < /ConfirmModalProvider> < /LoadingScreenProvider> < /ModalsProvider> < /SafeAreaProvider> < /IntlProvider> < /StoreProvider> < /StyleProvider>); } ; export const App = __DEV__ ? AppBody : codePush ( AppBody ) ;