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

This commit is contained in:
Yu Sung
2026-07-10 13:04:06 +09:00
parent 5213f0d98d
commit ce191539f2
8 changed files with 103 additions and 21 deletions

View File

@@ -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
}