Repository Mobile nawakara use react native
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.1 KiB

8 months ago
import React from 'react';
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react';
import { StyleSheet, View } from 'react-native';
import { ActivityIndicator, MD2Colors } from 'react-native-paper';
import { persistor, store } from './appredux/store';
import AppRoutes from './navigation/AppRoutes'
import Toast from 'react-native-toast-message';
import { toastConfig } from './utils/Toast';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
const App = () => {
return (
<Provider store={store}>
<PersistGate loading={
<View style={styles.container}>
<ActivityIndicator size='large' animating={true} color="#1C1B40" />
</View>
} persistor={persistor}>
<GestureHandlerRootView style={{ flex: 1 }}>
<AppRoutes />
<Toast position='bottom' config={toastConfig} visibilityTime={5000} />
</GestureHandlerRootView>
</PersistGate>
</Provider>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: 'white',
},
});
export default App;