File tree Expand file tree Collapse file tree 2 files changed +27
-3
lines changed
Expand file tree Collapse file tree 2 files changed +27
-3
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,31 @@ const Profile = ({
9292
9393 const getDescription = ( ) => {
9494 if ( mode === "friend" && info ) {
95- return `${ info . virtualFriendAge } · ${ info . virtualFriendSex } · ${ info . virtualFriendRelationship } ` ;
95+ const parts = [ ] ;
96+
97+ // 나이 처리 (0이면 추가하지 않음)
98+ if ( info . virtualFriendAge && info . virtualFriendAge > 0 ) {
99+ parts . push ( `${ info . virtualFriendAge } 대` ) ;
100+ }
101+
102+ // 성별 처리
103+ if ( info . virtualFriendSex === "FEMALE" ) {
104+ parts . push ( "여성" ) ;
105+ } else if ( info . virtualFriendSex === "MALE" ) {
106+ parts . push ( "남성" ) ;
107+ }
108+
109+ // 관계 추가
110+ if ( info . virtualFriendJob ) {
111+ parts . push ( info . virtualFriendJob ) ;
112+ }
113+
114+ // 모든 데이터가 없으면 기본 메시지 반환
115+ if ( parts . length === 0 ) {
116+ return "이 친구 추가 정보를 선택하지 않았어요" ;
117+ }
118+
119+ return parts . join ( " · " ) ;
96120 } else if ( mode === "topic" && topicData ) {
97121 return topicData . description ;
98122 }
@@ -122,7 +146,7 @@ const Profile = ({
122146 className = "absolute top-[12px] left-[11px] h-12 w-12 rounded-full object-cover"
123147 />
124148
125- < div className = "px-4 pt-[69px ]" >
149+ < div className = "px-4 pt-[60px ]" >
126150 < h2 className = "flex items-center space-x-1 text-base" >
127151 < span className = "font-bold" > { getTitle ( ) } </ span >
128152 { getSubtitle ( ) && (
Original file line number Diff line number Diff line change @@ -5,5 +5,5 @@ export interface VirtualFriend {
55 virtualFriendName : string ;
66 virtualFriendAge : number ;
77 virtualFriendSex : string ;
8- virtualFriendRelationship : string ;
8+ virtualFriendJob : string ;
99}
You can’t perform that action at this time.
0 commit comments