components/PostCard.js
import {useNavigation} from '@react-navigation/native'; ( ) function ({user, photoURL, description, createdAt, id}) { const date ( () => (createdAt new Date(createdAt._seconds 1000) new Date()), [createdAt], ); const navigation = useNavigation(); const onOpenProfile = () => { navigation.navigate('Profile', { userId: user.id, displayName: user.displayName, }); }; ( )
이제 포스트 목록 화면에서 사용자 정보 영역을 눌러보세요. 다음과 같이 프로필 화면이 나타났나요? 화면의 타이틀도 변경됐는지 확인해보세요(만약 가입할 때 프로필 사진을 설정했다면 회색 사용자 이미지가 아닌 이전에 업로드한 이미지가 보일 것입니다).

▲ 그림 9-14 프로필 화면의 사용자 정보