88 lines
2.7 KiB
TypeScript
Raw Normal View History

2025-01-28 08:19:46 -06:00
import { Image, StyleSheet, Platform } from 'react-native';
import ParallaxScrollView from '@/components/default/ParallaxScrollView';
import { ThemedText, ThemedView } from '@/components/theme/Theme';
2025-01-28 12:56:22 -06:00
import { Colors } from '@/constants/Colors';
import { useColorScheme } from '@/hooks/useColorScheme';
2025-01-28 08:19:46 -06:00
const HomeScreen = () => {
2025-01-28 12:56:22 -06:00
const scheme = useColorScheme() ?? 'dark';
2025-01-28 08:19:46 -06:00
return (
<ParallaxScrollView
headerImage={
<Image
2025-01-28 12:56:22 -06:00
source={require('@/assets/images/tech_tracker_logo.png')}
2025-01-28 08:19:46 -06:00
style={styles.reactLogo}
/>
2025-01-28 08:45:02 -06:00
}
2025-01-28 12:56:22 -06:00
headerTitle={
<ThemedText type='title' style={styles.headerTitle}>Tech Tracker</ThemedText>
}
2025-01-28 08:45:02 -06:00
>
2025-01-28 08:19:46 -06:00
<ThemedView style={styles.titleContainer}>
2025-01-28 08:45:02 -06:00
<ThemedText type='title'>Welcome!</ThemedText>
2025-01-28 08:19:46 -06:00
</ThemedView>
<ThemedView style={styles.stepContainer}>
2025-01-28 08:45:02 -06:00
<ThemedText type='subtitle'>Step 1: Try it</ThemedText>
2025-01-28 08:19:46 -06:00
<ThemedText>
2025-01-28 08:45:02 -06:00
Edit <ThemedText type='defaultSemiBold'>app/(tabs)/index.tsx</ThemedText> to see changes.
2025-01-28 08:19:46 -06:00
Press{' '}
2025-01-28 08:45:02 -06:00
<ThemedText type='defaultSemiBold'>
2025-01-28 08:19:46 -06:00
{Platform.select({
ios: 'cmd + d',
android: 'cmd + m',
2025-01-28 08:45:02 -06:00
web: 'F12',
2025-01-28 08:19:46 -06:00
})}
</ThemedText>{' '}
to open developer tools.
</ThemedText>
</ThemedView>
<ThemedView style={styles.stepContainer}>
2025-01-28 08:45:02 -06:00
<ThemedText type='subtitle'>Step 2: Explore</ThemedText>
2025-01-28 08:19:46 -06:00
<ThemedText>
Tap the Explore tab to learn more about what's included in this starter app.
</ThemedText>
</ThemedView>
<ThemedView style={styles.stepContainer}>
2025-01-28 08:45:02 -06:00
<ThemedText type='subtitle'>Step 3: Get a fresh start</ThemedText>
2025-01-28 08:19:46 -06:00
<ThemedText>
When you're ready, run{' '}
2025-01-28 08:45:02 -06:00
<ThemedText type='defaultSemiBold'>npm run reset-project</ThemedText> to get a fresh{' '}
<ThemedText type='defaultSemiBold'>app</ThemedText> directory. This will move the current{' '}
<ThemedText type='defaultSemiBold'>app</ThemedText> to{' '}
<ThemedText type='defaultSemiBold'>app-example</ThemedText>.
2025-01-28 08:19:46 -06:00
</ThemedText>
</ThemedView>
</ParallaxScrollView>
);
};
export default HomeScreen;
2025-01-28 08:19:46 -06:00
const styles = StyleSheet.create({
titleContainer: {
flexDirection: 'row',
alignItems: 'center',
gap: 8,
},
stepContainer: {
gap: 8,
marginBottom: 8,
},
reactLogo: {
2025-01-28 12:56:22 -06:00
height: 80,
width: 82,
bottom: 10,
left: 10,
position: 'absolute',
},
headerTitle: {
2025-01-28 08:19:46 -06:00
position: 'absolute',
2025-01-28 12:56:22 -06:00
bottom: 20,
left: 40,
right: 0,
textAlign: 'center',
fontSize: 48,
lineHeight: 64,
fontWeight: 'bold',
2025-01-28 08:19:46 -06:00
},
});