-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
54 lines (48 loc) · 1.24 KB
/
index.js
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
import React, {useState, useEffect} from 'react';
import {
AppRegistry,
useColorScheme,
Image,
View,
StatusBar,
} from 'react-native';
import {ThemeProvider} from 'styled-components/native';
const jobs_splash = require('assets/images/jobs-splash.png');
import {splashDelay} from '@constants';
import Routes from './src/routes/Routes';
import themes from 'styles/themes';
const Jobs = () => {
const deviceTheme = useColorScheme();
const theme = themes[deviceTheme] || theme.light;
const [showSplash, setShowSplash] = useState(true);
useEffect(() => {
setTimeout(() => {
setShowSplash(false);
}, splashDelay);
}, []);
return (
<>
<StatusBar backgroundColor={'white'} barStyle={'dark-content'} />
{showSplash ? (
<View
style={{
flex: 1,
backgroundColor: 'white',
justifyContent: 'center',
alignItems: 'center',
}}>
<Image
source={jobs_splash}
style={{width: 200}}
resizeMode={'contain'}
/>
</View>
) : (
<ThemeProvider theme={theme}>
<Routes />
</ThemeProvider>
)}
</>
);
};
AppRegistry.registerComponent('jobs', () => Jobs);