-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
54 lines (50 loc) · 1.4 KB
/
App.tsx
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
*/
import React, { useState } from 'react';
import {
ImageBackground,
StatusBar,
StyleSheet,
} from 'react-native';
import { Provider } from 'react-redux';
import { persistor, store } from './src/config/redux/reduxStore';
import { PersistGate } from 'redux-persist/integration/react';
import InitialApp from './InitialApp';
import './src/i18n/index';
function App(props: any): JSX.Element {
const [background, setBackground] = useState<any>(require('./src/assets/png/background.png'));
return (
<Provider store={store}>
<PersistGate persistor={persistor}>
<ImageBackground source={background} style={styles.ImageBackgroundStyle} imageStyle={styles.ImageBackgroundimageStyle}>
<StatusBar
// barStyle={'dark-content'}
animated={true}
backgroundColor={styles.backgroundStyle.backgroundColor}
/>
<InitialApp {...props} setBackground={setBackground} />
</ImageBackground>
</PersistGate>
</Provider>
);
}
const styles = StyleSheet.create({
backgroundStyle: {
backgroundColor: '#60777f',
},
ImageBackgroundStyle: {
width: '100%',
height: '100%'
},
ImageBackgroundimageStyle: {
resizeMode: 'cover',
backgroundColor: 'transparent',
flex: 1,
flexDirection: 'column'
}
});
export default App;