Newer
Older
import { NavigationContainer } from '@react-navigation/native';
import AntDesignProvider from '@ant-design/react-native/lib/provider';
import Toast from 'react-native-toast-message';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { Platform } from 'react-native';
import { ColorPallet, customTheme } from './src/theme/theme';
import RootStack from './src/navigators/RootStack';
import { initStoredLanguage } from './src/localization';
import toastConfig from './src/components/toast/ToastConfig';
import {RealmProvider} from '@realm/react';
import {schemas} from './src/db-models';
import './src/seal/injectCryptoServiceMobile';
// Required by @vereign/lib-mime
global.Buffer = Buffer;
const navigationTheme = {
dark: false,
colors: {
primary: ColorPallet.brand.primary,
background: ColorPallet.grayscale.white,
card: ColorPallet.brand.primary,
text: ColorPallet.grayscale.white,
border: ColorPallet.grayscale.white,
notification: ColorPallet.grayscale.white,
},
};
<SafeAreaProvider>
<AntDesignProvider theme={customTheme}>
<NavigationContainer theme={navigationTheme}>
<RealmProvider schema={schemas}>
</RealmProvider>
<Toast
topOffset={Platform.OS === 'android' ? 5 : 50}
config={toastConfig}
/>
</NavigationContainer>