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.2 KiB

10 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 } from 'react-native-paper';
10 months ago
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';
import { colors } from '../src/utils/color'
10 months ago
const App = () => {
return (
<Provider store={store}>
<PersistGate loading={
<View style={styles.container}>
<ActivityIndicator size='large' style={{ backgroundColor: colors.pureWhite }} animating={true} color={colors.blue} />
10 months ago
</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;