@@ -34,7 +34,6 @@ import LikeCommentBottomSheetContent from './LikeCommentBottomSheetContent/index
3434
3535import {
3636 PostLayout ,
37- PostContainer ,
3837 PostInfoContainer ,
3938 UserProfile ,
4039 UserName ,
@@ -129,17 +128,19 @@ const PostBase: React.FC<PostBaseProps> = ({ onClickMenu }) => {
129128 return (
130129 < OODDFrame >
131130 < TopBar LeftButtonSrc = { Left } onClickLeftButton = { ( ) => nav ( - 1 ) } />
132- < PostInfoContainer >
133- < UserProfile >
134- < Skeleton width = { 2.5 } height = { 2.5 } borderRadius = { 2.5 } />
135- </ UserProfile >
136- < UserNameWrapper >
137- < Skeleton width = { 6.25 } height = { 1.25 } />
138- </ UserNameWrapper >
139- </ PostInfoContainer >
140- < PostWrapper >
141- < Skeleton width = "100%" height = { 40 } />
142- </ PostWrapper >
131+ < PostLayout >
132+ < PostInfoContainer >
133+ < UserProfile >
134+ < Skeleton width = { 2.5 } height = { 2.5 } borderRadius = { 2.5 } />
135+ </ UserProfile >
136+ < UserNameWrapper >
137+ < Skeleton width = { 6.25 } height = { 1.25 } />
138+ </ UserNameWrapper >
139+ </ PostInfoContainer >
140+ < PostWrapper >
141+ < Skeleton width = "100%" height = { 40 } />
142+ </ PostWrapper >
143+ </ PostLayout >
143144 </ OODDFrame >
144145 ) ;
145146 }
@@ -149,76 +150,70 @@ const PostBase: React.FC<PostBaseProps> = ({ onClickMenu }) => {
149150 < TopBar LeftButtonSrc = { Left } />
150151
151152 < PostLayout >
152- < PostContainer >
153- < PostInfoContainer >
154- < UserProfile onClick = { handleUserClick } >
155- { user && < img src = { post . user . profilePictureUrl } alt = "profileImg" /> }
156- </ UserProfile >
157- < UserName
158- onClick = { handleUserClick }
159- $textTheme = { { style : 'body2-medium' } }
160- color = { theme . colors . text . primary }
161- >
162- { user ?. nickname ?? '알수없음' }
163- </ UserName >
164- < StyledText
165- className = "timeAgo"
166- $textTheme = { { style : 'caption2-regular' } }
167- color = { theme . colors . text . tertiary }
168- >
169- { timeAgo }
170- </ StyledText >
171- < MenuBtn onClick = { onClickMenu } >
172- < img src = { More } alt = "more" />
173- </ MenuBtn >
174- </ PostInfoContainer >
175-
176- { post && < ImageSwiper images = { post . postImages . map ( ( image ) => image . url ) } /> }
153+ < PostInfoContainer >
154+ < UserProfile onClick = { handleUserClick } >
155+ { user && < img src = { post . user . profilePictureUrl } alt = "profileImg" /> }
156+ </ UserProfile >
157+ < UserName onClick = { handleUserClick } $textTheme = { { style : 'body2-medium' } } color = { theme . colors . text . primary } >
158+ { user ?. nickname ?? '알수없음' }
159+ </ UserName >
160+ < StyledText className = "timeAgo" $textTheme = { { style : 'caption2-regular' } } color = { theme . colors . text . tertiary } >
161+ { timeAgo }
162+ </ StyledText >
163+ < MenuBtn onClick = { onClickMenu } >
164+ < img src = { More } alt = "more" />
165+ </ MenuBtn >
166+ </ PostInfoContainer >
177167
178- { post ?. postClothings && (
179- < ClothingInfoList className = "post-mode" >
180- { post . postClothings . map ( ( clothingObj , index ) => (
181- < ClothingInfoItem key = { index } clothingObj = { clothingObj } />
182- ) ) }
183- </ ClothingInfoList >
168+ { post && (
169+ < PostWrapper >
170+ < ImageSwiper images = { post . postImages . map ( ( image ) => image . url ) } />
171+ </ PostWrapper >
172+ ) }
173+
174+ { post ?. postClothings ? (
175+ < ClothingInfoList className = "post-mode" >
176+ { post . postClothings . map ( ( clothingObj , index ) => (
177+ < ClothingInfoItem key = { index } clothingObj = { clothingObj } />
178+ ) ) }
179+ </ ClothingInfoList >
180+ ) : null }
181+
182+ < IconRow >
183+ < IconWrapper >
184+ < Icon onClick = { ( ) => togglePostLikeStatus ( ) } >
185+ { post ?. isPostLike ? < Like isFilled = { true } color = { theme . colors . brand . primary } /> : < Like /> }
186+ </ Icon >
187+ < span onClick = { ( ) => handleLikeCommentOpen ( 'likes' ) } > { post ?. postLikesCount ?? 0 } </ span >
188+ </ IconWrapper >
189+ < IconWrapper onClick = { ( ) => handleLikeCommentOpen ( 'comments' ) } >
190+ < Icon >
191+ < img src = { Message } alt = "message" />
192+ </ Icon >
193+ < span > { post ?. postCommentsCount ?? 0 } </ span >
194+ </ IconWrapper >
195+ </ IconRow >
196+
197+ < PostContentContainer >
198+ { post && (
199+ < div >
200+ < Content
201+ ref = { contentRef }
202+ onClick = { toggleTextDisplay }
203+ $showFullText = { showFullText }
204+ $textTheme = { { style : 'body4-light' } }
205+ color = { theme . colors . text . primary }
206+ >
207+ { post . content }
208+ </ Content >
209+ { isTextOverflowing && (
210+ < ShowMoreButton onClick = { toggleTextDisplay } $textTheme = { { style : 'body4-light' } } >
211+ { showFullText ? '간략히 보기' : '더 보기' }
212+ </ ShowMoreButton >
213+ ) }
214+ </ div >
184215 ) }
185-
186- < IconRow >
187- < IconWrapper >
188- < Icon onClick = { ( ) => togglePostLikeStatus ( ) } >
189- { post ?. isPostLike ? < Like isFilled = { true } color = { theme . colors . brand . primary } /> : < Like /> }
190- </ Icon >
191- < span onClick = { ( ) => handleLikeCommentOpen ( 'likes' ) } > { post ?. postLikesCount ?? 0 } </ span >
192- </ IconWrapper >
193- < IconWrapper onClick = { ( ) => handleLikeCommentOpen ( 'comments' ) } >
194- < Icon >
195- < img src = { Message } alt = "message" />
196- </ Icon >
197- < span > { post ?. postCommentsCount ?? 0 } </ span >
198- </ IconWrapper >
199- </ IconRow >
200-
201- < PostContentContainer >
202- { post && (
203- < div >
204- < Content
205- ref = { contentRef }
206- onClick = { toggleTextDisplay }
207- $showFullText = { showFullText }
208- $textTheme = { { style : 'body4-light' } }
209- color = { theme . colors . text . primary }
210- >
211- { post . content }
212- </ Content >
213- { isTextOverflowing && (
214- < ShowMoreButton onClick = { toggleTextDisplay } $textTheme = { { style : 'body4-light' } } >
215- { showFullText ? '간략히 보기' : '더 보기' }
216- </ ShowMoreButton >
217- ) }
218- </ div >
219- ) }
220- </ PostContentContainer >
221- </ PostContainer >
216+ </ PostContentContainer >
222217 </ PostLayout >
223218
224219 < NavBar />
0 commit comments