-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.tsx
More file actions
62 lines (56 loc) · 1.84 KB
/
Copy pathindex.tsx
File metadata and controls
62 lines (56 loc) · 1.84 KB
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
import { View, Button, StyleSheet, Image, ScrollView } from 'react-native';
import { Link } from 'expo-router';
import LogViewer from '@/components/LogViewer';
import BatteryInfo from '@/components/BatteryInfo';
import CustomHeader from '@/components/CustomHeader';
import * as Sentry from '@sentry/react-native';
export default function HomeScreen() {
return (
<View style={{ flex: 1, backgroundColor: '#000' }}>
<CustomHeader title="Home" showModalButton={true} />
<ScrollView contentContainerStyle={styles.scrollContent} style={{ flex: 1 }}>
<View style={styles.container}>
<Image source={require('../../assets/images/icon.png')} style={imgStyles.image} />
<LogViewer />
{/* Battery information */}
<BatteryInfo />
{/* Link to Login page */}
<View style={{ marginTop: 12 }}>
<Link href="/login" asChild>
<Button title="Go to Login" />
</Link>
<Button title='Try!' onPress={ () => { Sentry.captureException(new Error('First error')) }}/>
</View>
</View>
</ScrollView>
</View>
);
}
const styles = StyleSheet.create({
scrollContent: {
paddingVertical: 20,
alignItems: 'center',
},
container: {
width: '90%',
alignItems: 'center',
},
batteryContainer: {
borderRadius: 8,
padding: 10,
marginVertical: 12,
width: '100%',
},
batteryText: {
color: '#FFFFFF',
fontSize: 16,
marginBottom: 4,
},
});
const imgStyles = StyleSheet.create({
image: {
width: 50,
height: 50,
resizeMode: 'contain',
},
});