-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
40 lines (36 loc) · 1020 Bytes
/
App.js
File metadata and controls
40 lines (36 loc) · 1020 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/* eslint-disable prettier/prettier */
import React from 'react';
import 'react-native-gesture-handler';
import {
SafeAreaView,
useColorScheme,
StyleSheet,
} from 'react-native';
import {Colors} from 'react-native/Libraries/NewAppScreen';
import {Provider} from 'react-redux';
import {PersistGate} from 'redux-persist/integration/react';
import {store, persistor} from './src/store/store';
import AppInner from './AppInner';
const App = () => {
const isDarkMode = useColorScheme() === 'dark';
const backgroundStyle = {
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
};
return (
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<SafeAreaView style={[backgroundStyle, styles.safeAreaView]}>
<AppInner />
</SafeAreaView>
</PersistGate>
</Provider>
);
};
const styles = StyleSheet.create({
safeAreaView: {
flexGrow: 1,
justifyContent: 'center',
alignContent: 'center',
},
});
export default App;