응원글 삭제 기능 추가

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

@@ -174,8 +174,12 @@ struct UserProfileView: View {
viewModel.isShowPopup = true
},
reportPopup: { cheerId in
viewModel.reportCheersId = cheerId
viewModel.isShowCheersReportMenu = true
viewModel.cheersId = cheerId
viewModel.isShowCheersReportView = true
},
deletePopup: { cheerId in
viewModel.cheersId = cheerId
viewModel.isShowCheersDeleteView = true
},
isLoading: $viewModel.isLoading
)
@@ -220,20 +224,18 @@ struct UserProfileView: View {
)
}
if viewModel.isShowCheersReportMenu {
VStack(spacing: 0) {
CheersReportMenuView(
isShowing: $viewModel.isShowCheersReportMenu,
onClickReport: { viewModel.isShowCheersReportView = true }
)
if proxy.safeAreaInsets.bottom > 0 {
Rectangle()
.foregroundColor(Color(hex: "222222"))
.frame(width: proxy.size.width, height: 15.3)
}
}
.ignoresSafeArea()
if viewModel.isShowCheersDeleteView {
SodaDialog(
title: "응원글 삭제",
desc: "삭제하시겠습니까?",
confirmButtonTitle: "삭제",
confirmButtonAction: {
viewModel.deleteCheers(creatorId: userId)
viewModel.isShowCheersDeleteView = false
},
cancelButtonTitle: "취소",
cancelButtonAction: { viewModel.isShowCheersDeleteView = false }
)
}
if viewModel.isShowCheersReportView {