응원글 삭제 기능 추가

This commit is contained in:
Yu Sung
2023-09-09 00:02:39 +09:00
parent b31933715d
commit 5d95c0f1c9
10 changed files with 227 additions and 131 deletions

View File

@@ -16,6 +16,7 @@ struct UserProfileFanTalkView: View {
let cheers: GetCheersResponse
let errorPopup: (String) -> Void
let reportPopup: (Int) -> Void
let deletePopup: (Int) -> Void
@Binding var isLoading: Bool
@State private var cheersContent: String = ""
@@ -97,15 +98,18 @@ struct UserProfileFanTalkView: View {
let cheer = viewModel.cheersList[$0]
UserProfileFanTalkCheersItemView(
userId: userId,
cheer: cheer,
cheersItem: cheer,
writeCheerReply: { cheersReplyContent in
viewModel.writeCheersReply(parentCheersId: cheer.cheersId, creatorId: userId, cheersReplyContent: cheersReplyContent)
},
modifyCheer: { cheersId, cheersReplyContent in
viewModel.modifyCheersReply(cheersId: cheersId, creatorId: userId, cheersReplyContent: cheersReplyContent)
viewModel.modifyCheers(cheersId: cheersId, creatorId: userId, cheersReplyContent: cheersReplyContent)
},
reportPopup: { cheersId in
reportPopup(cheersId)
},
onClickDelete: { cheersId in
deletePopup(cheersId)
}
)
.onTapGesture {