fix(main): 팔로잉 커뮤니티 상세로 이동한다

This commit is contained in:
Yu Sung
2026-07-12 05:54:02 +09:00
parent e717a12344
commit ec79e3ce8b
5 changed files with 67 additions and 21 deletions

View File

@@ -4,15 +4,18 @@ struct MainHomeFollowingNewsSection: View {
let recentNews: [FollowingNewsResponse]
let onTapCreator: (Int) -> Void
let onTapContent: (Int) -> Void
let onTapCommunityPost: (Int) -> Void
init(
recentNews: [FollowingNewsResponse],
onTapCreator: @escaping (Int) -> Void = { _ in },
onTapContent: @escaping (Int) -> Void = { _ in }
onTapContent: @escaping (Int) -> Void = { _ in },
onTapCommunityPost: @escaping (Int) -> Void = { _ in }
) {
self.recentNews = recentNews
self.onTapCreator = onTapCreator
self.onTapContent = onTapContent
self.onTapCommunityPost = onTapCommunityPost
}
var body: some View {
@@ -82,7 +85,13 @@ struct MainHomeFollowingNewsSection: View {
createdAt: communityPost.relativeCreatedAtText(),
isLike: false,
likeCount: communityPost.likeCount,
commentCount: communityPost.commentCount
commentCount: communityPost.commentCount,
onTapPost: {
onTapCommunityPost(communityPost.postId)
},
onTapComment: {
onTapCommunityPost(communityPost.postId)
}
)
}