diff --git a/src/screens/feed/card.tsx b/src/screens/feed/card.tsx index 75f3be5..ea51b06 100644 --- a/src/screens/feed/card.tsx +++ b/src/screens/feed/card.tsx @@ -5,11 +5,13 @@ import { faUserGroup, } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome'; +import { useNavigation } from '@react-navigation/native'; import React, { useEffect, useState } from 'react'; import type { Snap } from '@/api'; import { client } from '@/api/common'; import { getUserState } from '@/core'; +import type { UserType } from '@/core/auth/utils'; import { Button, Image, Pressable, Text, TouchableOpacity, View } from '@/ui'; import CommentButton from './comment-button'; @@ -50,8 +52,16 @@ const CardHeader = ({ snap: Snap; formattedDate: string; }) => { + const navigate = useNavigation(); + const handlePress = async () => { + const { data: user } = await client.identity.get( + `/api/auth/users/${snap.author}` + ); + + navigate.navigate('UserProfile', { user }); + }; return ( - + { return ( <> - + {user?.first_name} {user?.last_name} - - + + {user?.ubication} - + - - + + {user?.bio_msg || 'No bio'} diff --git a/src/screens/profile/components/profle-header.tsx b/src/screens/profile/components/profle-header.tsx index c27cd98..d15a9b0 100644 --- a/src/screens/profile/components/profle-header.tsx +++ b/src/screens/profile/components/profle-header.tsx @@ -14,7 +14,7 @@ export const ProfileHeader = ({ user }: ProfileHeaderProps) => { diff --git a/src/screens/profile/profile-view.tsx b/src/screens/profile/profile-view.tsx index 89105f1..faeabf1 100644 --- a/src/screens/profile/profile-view.tsx +++ b/src/screens/profile/profile-view.tsx @@ -40,7 +40,7 @@ const ProfileScreenView = ({ }, [user]); return ( - +