크리에이터 채널 - 콘텐츠 영역 추가

This commit is contained in:
Yu Sung
2023-08-20 20:36:17 +09:00
parent 154b5826c6
commit a5b954ada2
6 changed files with 204 additions and 2 deletions

View File

@@ -12,6 +12,7 @@ struct GetCreatorProfileResponse: Decodable {
let userDonationRanking: [UserDonationRankingResponse]
let similarCreatorList: [SimilarCreatorResponse]
let liveRoomList: [LiveRoomResponse]
let contentList: [GetAudioContentListItem]
let notice: String
let cheers: GetCheersResponse
let activitySummary: GetCreatorActivitySummary

View File

@@ -24,7 +24,9 @@ struct UserProfileContentView: View {
Text("전체보기")
.font(.custom(Font.medium.rawValue, size: 12))
.foregroundColor(Color(hex: "bbbbbb"))
.onTapGesture {}
.onTapGesture {
AppState.shared.setAppStep(step: .contentListAll(userId: userId))
}
}
if userId == UserDefaults.int(forKey: .userId) {
@@ -44,7 +46,13 @@ struct UserProfileContentView: View {
let item = items[index]
ContentListItemView(item: item)
.contentShape(Rectangle())
.onTapGesture {}
.onTapGesture {
AppState
.shared
.setAppStep(
step: .contentDetail(contentId: item.contentId)
)
}
}
}
.padding(.top, 21)

View File

@@ -88,6 +88,17 @@ struct UserProfileView: View {
}
}
if creatorProfile.contentList.count > 0 ||
userId == UserDefaults.int(forKey: .userId)
{
UserProfileContentView(
userId: userId,
items: creatorProfile.contentList
)
.padding(.top, 46.7)
.padding(.horizontal, 13.3)
}
if creatorProfile.liveRoomList.count > 0 {
UserProfileLiveView(
userId: userId,