File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -575,14 +575,23 @@ const convertedTeams: Team[] = groups.map((g: any) => ({
575575 : `opt${ userVoteRaw } `
576576 : undefined ;
577577
578- const comments = ( p . comments ?? [ ] ) . map ( ( c : any ) => ( {
578+ const comments = ( p . comments ?? [ ] ) . map ( ( c : any ) => {
579+ const fallbackAuthor =
580+ c . writerNickname ??
581+ eventInfo ?. nickname ?? // 이벤트 참여 닉네임
582+ displayNickname ?? // 현재 로그인 유저 닉네임
583+ "익명" ;
584+
585+ return {
579586 id : String ( c . commentId ?? c . id ?? "" ) ,
580- author : c . writerNickname ?? c . author ?? c . nickname ?? "익명" ,
587+ author : fallbackAuthor ,
581588 content : c . content ?? c . text ?? "" ,
582589 timestamp : c . createdAt ?? c . createdAtAt ?? c . timestamp ?? "" ,
583590 imageUrl : c . imageUrl ?? c . img ?? undefined ,
584591 isWrite : Boolean ( c . isMine ?? c . isWrite ?? false ) ,
585- } ) ) ;
592+ } ;
593+ } ) ;
594+
586595
587596console . log (
588597 "[DEBUG][convertPost] full post object" ,
You can’t perform that action at this time.
0 commit comments