index.js 1.1 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/themes'
  8. import './app/utils/constant';
  9. import './app/utils/notification';
  10. import './app/utils/vector_icon';
  11. import Router from './app/pages/Router';
  12. import {name as appName} from './app.json';
  13. //import {ModalPortal} from 'react-native-modals';
  14. import ModalPortal from './app/components/ModalPortal';
  15. import {RootSiblingParent} from 'react-native-root-siblings';
  16. import { SafeAreaView } from 'react-native-safe-area-context';
  17. const Index = () => {
  18. return (
  19. <RootSiblingParent>
  20. <StatusBar barStyle={themeStatusBar} backgroundColor={colorPrimaryDark}/>
  21. { isIOS
  22. ? <KeyboardAvoidingView style={ui.flex1} behavior="padding">
  23. <Router />
  24. </KeyboardAvoidingView>
  25. : <Router />
  26. }
  27. <ModalPortal />
  28. <SafeAreaView style={{flex: 0, backgroundColor: colorLight}}></SafeAreaView>
  29. </RootSiblingParent>
  30. );
  31. };
  32. AppRegistry.registerComponent(appName, () => Index);