fix(main): 추천 커뮤니티 상세로 이동한다
This commit is contained in:
@@ -14,6 +14,7 @@ struct CommunityPostCard: View {
|
||||
let isLike: Bool
|
||||
let likeCount: Int
|
||||
let commentCount: Int
|
||||
let onTapPost: () -> Void
|
||||
let onTapLike: () -> Void
|
||||
let onTapComment: () -> Void
|
||||
let onTapPurchase: () -> Void
|
||||
@@ -36,6 +37,7 @@ struct CommunityPostCard: View {
|
||||
isLike: Bool,
|
||||
likeCount: Int,
|
||||
commentCount: Int,
|
||||
onTapPost: @escaping () -> Void = {},
|
||||
onTapLike: @escaping () -> Void = {},
|
||||
onTapComment: @escaping () -> Void = {},
|
||||
onTapPurchase: @escaping () -> Void = {}
|
||||
@@ -52,6 +54,7 @@ struct CommunityPostCard: View {
|
||||
self.isLike = isLike
|
||||
self.likeCount = likeCount
|
||||
self.commentCount = commentCount
|
||||
self.onTapPost = onTapPost
|
||||
self.onTapLike = onTapLike
|
||||
self.onTapComment = onTapComment
|
||||
self.onTapPurchase = onTapPurchase
|
||||
@@ -76,6 +79,8 @@ struct CommunityPostCard: View {
|
||||
.padding(SodaSpacing.s14)
|
||||
.background(Color.gray900)
|
||||
.clipShape(RoundedRectangle(cornerRadius: SodaSpacing.s14, style: .continuous))
|
||||
.contentShape(RoundedRectangle(cornerRadius: SodaSpacing.s14, style: .continuous))
|
||||
.onTapGesture(perform: onTapPost)
|
||||
.onChange(of: isLike) { newValue in
|
||||
localIsLike = newValue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user