fix(main): 추천 커뮤니티 상세로 이동한다
This commit is contained in:
@@ -2,18 +2,18 @@ import SwiftUI
|
||||
|
||||
struct MainHomePopularCommunitySection: View {
|
||||
let items: [HomePopularCommunityPostItem]
|
||||
let onTapCommunity: (Int) -> Void
|
||||
let onTapCommunityPost: (Int) -> Void
|
||||
let onTapLike: (Int) -> Void
|
||||
let onTapPurchase: (HomePopularCommunityPostItem) -> Void
|
||||
|
||||
init(
|
||||
items: [HomePopularCommunityPostItem],
|
||||
onTapCommunity: @escaping (Int) -> Void = { _ in },
|
||||
onTapCommunityPost: @escaping (Int) -> Void = { _ in },
|
||||
onTapLike: @escaping (Int) -> Void = { _ in },
|
||||
onTapPurchase: @escaping (HomePopularCommunityPostItem) -> Void = { _ in }
|
||||
) {
|
||||
self.items = items
|
||||
self.onTapCommunity = onTapCommunity
|
||||
self.onTapCommunityPost = onTapCommunityPost
|
||||
self.onTapLike = onTapLike
|
||||
self.onTapPurchase = onTapPurchase
|
||||
}
|
||||
@@ -38,11 +38,14 @@ struct MainHomePopularCommunitySection: View {
|
||||
isLike: item.isLiked,
|
||||
likeCount: item.likeCount,
|
||||
commentCount: item.commentCount,
|
||||
onTapPost: {
|
||||
onTapCommunityPost(item.postId)
|
||||
},
|
||||
onTapLike: {
|
||||
onTapLike(item.postId)
|
||||
},
|
||||
onTapComment: {
|
||||
onTapCommunity(item.creatorId)
|
||||
onTapCommunityPost(item.postId)
|
||||
},
|
||||
onTapPurchase: {
|
||||
onTapPurchase(item)
|
||||
|
||||
Reference in New Issue
Block a user