-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
73 lines (68 loc) · 1.59 KB
/
App.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import React, { useEffect, useState } from 'react'
import {
StyleSheet,
View,
StatusBar,
Dimensions,
SafeAreaView,
Image,
} from 'react-native'
import { COLOR, STYLE } from './services/style'
import { Provider as PaperProvider } from 'react-native-paper'
import Timer from './components/Timer'
import InfoProvider from './components/provider/InfoProvider'
import SettingsProvider from './components/provider/SettingsProvider'
const width = Dimensions.get('window').width
export default function App() {
const [timeSaverVisible, setTimeSaverVisible] = useState(false)
useEffect(() => {
StatusBar.setHidden(true)
}, [])
return (
<PaperProvider>
<InfoProvider>
<SettingsProvider>
<SafeAreaView style={[styles.container, STYLE.BG_DARK]}>
<View style={styles.header}>
<View style={styles.logo}>
<Image
source={require('./assets/icon.png')}
width={width * 0.125}
height={width * 0.125}
style={[
{ width: width * 0.125, height: width * 0.125, borderRadius: 10 },
]}
/>
</View>
</View>
<Timer />
</SafeAreaView>
</SettingsProvider>
</InfoProvider>
</PaperProvider>
)
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'space-between',
},
header: {
width: width,
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center',
paddingHorizontal: width * 0.05,
},
logo: {
shadowColor: COLOR.PRIMARY,
shadowOffset: {
width: 0,
height: 0,
},
shadowOpacity: 1,
shadowRadius: 50,
elevation: 5,
},
})