-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathApp.tsx
39 lines (34 loc) · 912 Bytes
/
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
import React from 'react';
import { StyleSheet, View } from 'react-native';
import Constants from 'expo-constants';
import { Score } from './components/Score/Score';
import useCachedResources from './hooks/useCachedResources';
const scoreItems = [
{ title: 'Mindful minutes', value: 0 },
{ title: 'Current streak', value: 8888 },
{ title: 'Longest streak', value: 33 },
{ title: 'Episodes completed', value: 77777 },
];
export default function App() {
const isLoadingComplete = useCachedResources();
if (!isLoadingComplete) {
return null;
}
return (
<View style={styles.container}>
<View style={styles.scoreContainer}>
<Score items={scoreItems} />
</View>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#090110',
paddingTop: Constants.statusBarHeight
},
scoreContainer: {
marginTop: 50
}
});