feat: show user name from user data

This commit is contained in:
Vinicius Souza 2024-10-31 10:26:07 -03:00
parent e5cfef057f
commit b54c83a2ce

View file

@ -3,7 +3,13 @@ import { LogOut } from 'lucide-react-native';
import { UserPhoto } from './UserPhoto';
import { useAuth } from '@hooks/useAuth';
export function HomeHeader() {
const {
user: { name },
} = useAuth();
return (
<HStack bg="$gray600" pt="$16" pb="$5" px="$8" alignItems="center" gap="$4">
<UserPhoto source={{ uri: 'https://i.pravatar.cc/200' }} alt="avatar image" h="$16" w="$16" />
@ -14,7 +20,7 @@ export function HomeHeader() {
</Text>
<Heading color="$gray100" fontSize="$md">
John Doe
{name}
</Heading>
</VStack>