index.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. /**
  2. * @format
  3. */
  4. import React from 'react';
  5. import {AppRegistry, KeyboardAvoidingView, StatusBar} from 'react-native';
  6. import 'react-native-gesture-handler';
  7. import './app/utils/notification';
  8. import './app/utils/constant';
  9. import './app/utils/vector_icon';
  10. import Router from './app/pages/Router';
  11. import {name as appName} from './app.json';
  12. //import {ModalPortal} from 'react-native-modals';
  13. import ModalPortal from './app/components/ModalPortal';
  14. import {RootSiblingParent} from 'react-native-root-siblings';
  15. import { SafeAreaView } from 'react-native-safe-area-context';
  16. const Index = () => {
  17. return (
  18. <RootSiblingParent>
  19. <StatusBar barStyle="dark-content" backgroundColor={colorPrimaryDark}/>
  20. { isIOS
  21. ? <KeyboardAvoidingView style={ui.flex1} behavior="padding">
  22. <Router />
  23. </KeyboardAvoidingView>
  24. : <Router />
  25. }
  26. <ModalPortal />
  27. <SafeAreaView style={{flex: 0, backgroundColor: 'white'}}></SafeAreaView>
  28. </RootSiblingParent>
  29. );
  30. };
  31. AppRegistry.registerComponent(appName, () => Index);