| 123456789101112131415161718192021222324 |
- import { Button } from 'react-native';
- import { View, Text } from 'react-native';
- import { useAuth } from '../../../context/AuthProvider';
- export default function AccountScreen() {
- const { user, logout } = useAuth();
- if (!user) return <Text>Loading...</Text>;
- return (
- <View
- style={{
- flex: 1,
- flexDirection: 'column',
- justifyContent: 'center',
- alignItems: 'center',
- paddingHorizontal: 4
- }}
- >
- <Text className="mb-8">Account PAGE</Text>
- <Text>{user?.username || 'No username'}</Text>
- <Button title="Log out" onPress={logout} />
- </View>
- );
- }
|