크리에이터 채널 - 크리에이터 커뮤니티 영역 추가

This commit is contained in:
Yu Sung
2023-12-15 00:25:13 +09:00
parent 7d34a4e27a
commit c84f1042e3
10 changed files with 189 additions and 169 deletions

View File

@@ -59,35 +59,27 @@ struct UserProfileView: View {
.padding(.top, 13.3)
.padding(.horizontal, 13.3)
HStack(spacing: 0) {
Text(
creatorProfile.notice.trimmingCharacters(in: .whitespaces).isEmpty ?
"공지사항이 없습니다." :
creatorProfile.notice
)
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(Color(hex: "000000"))
.lineLimit(viewModel.isExpandNotice ? Int.max : 1)
Spacer()
if creatorProfile.creator.creatorId == UserDefaults.int(forKey: .userId) {
Image("ic_review")
.resizable()
.frame(width: 20, height: 20)
}
}
.padding(.horizontal, 26.7)
.padding(.vertical, 13.3)
.background(Color(hex: "fdca2f"))
.padding(.top, 13.3)
.onTapGesture {
if creatorProfile.creator.creatorId == UserDefaults.int(forKey: .userId) {
AppState.shared.setAppStep(step: .creatorNoticeWrite(notice: creatorProfile.notice))
} else {
viewModel.isExpandNotice.toggle()
ScrollView(.horizontal, showsIndicators: false) {
LazyHStack(spacing: 13.3) {
if UserDefaults.int(forKey: .userId) == creatorProfile.creator.creatorId {
CreatorCommunityWriteItemView()
}
CreatorCommunityItemView()
.frame(width: 320)
CreatorCommunityItemView()
.frame(width: 320)
CreatorCommunityItemView()
.frame(width: 320)
CreatorCommunityMoreItemView()
}
.padding(.horizontal, 15)
}
.frame(minHeight: 146)
.padding(.top, 26.7)
}
if creatorProfile.contentList.count > 0 ||