import { Image } from 'expo-image';
import { Platform, StyleSheet, TouchableOpacity, Alert } from 'react-native';
import { HelloWave } from '@/components/hello-wave';
import ParallaxScrollView from '@/components/misc/parallax-scroll-view';
import { ThemedText } from '@/components/misc/themed-text';
import { ThemedView } from '@/components/misc/themed-view';
import { Link } from 'expo-router';
import { useAuth } from '@/context/AuthContext';
import { Button } from '@/components/ui';
export default function HomeScreen() {
const { user, logout } = useAuth();
const handleLogout = async () => {
Alert.alert(
'Sair',
'Tem certeza que quer sair?',
[
{ text: 'Cancelar', style: 'cancel' },
{
text: 'Sair',
style: 'destructive',
onPress: logout
},
]
);
};
return (
}>
Bem vindo{user?.firstName ? `, ${user.firstName}` : ''}!
Step 1: Try it
Edit app/(tabs)/index.tsx to see changes.
Press{' '}
{Platform.select({
ios: 'cmd + d',
android: 'cmd + m',
web: 'F12',
})}
{' '}
to open developer tools.
Step 2: Explore
alert('Action pressed')} />
alert('Share pressed')}
/>
alert('Delete pressed')}
/>
{`Tap the Explore tab to learn more about what's included in this starter app.`}
Step 3: Get a fresh start
{`When you're ready, run `}
npm run reset-project to get a fresh{' '}
app directory. This will move the current{' '}
app to{' '}
app-example.
);
}
const styles = StyleSheet.create({
titleContainer: {
flexDirection: 'row',
alignItems: 'center',
gap: 8,
},
stepContainer: {
gap: 8,
marginBottom: 8,
},
reactLogo: {
height: 178,
width: 290,
bottom: 0,
left: 0,
position: 'absolute',
},
});