콘텐츠 전체보기

- 카테고리 추가
This commit is contained in:
Yu Sung
2024-02-07 15:09:48 +09:00
parent 638d00ffc3
commit 62904d96b1
7 changed files with 196 additions and 10 deletions

View File

@@ -35,6 +35,15 @@ struct ContentListView: View {
.frame(height: 50)
.background(Color.black)
if !viewModel.categoryList.isEmpty {
ContentListCategoryView(
categoryList: viewModel.categoryList,
selectCategory: { viewModel.selectCategory(categoryId: $0) },
selectedCategory: $viewModel.selectedCategory
)
.padding(.horizontal, 13.3)
}
if userId == UserDefaults.int(forKey: .userId) {
Text("새로운 콘텐츠 등록하기")
.font(.custom(Font.bold.rawValue, size: 15))
@@ -132,12 +141,14 @@ struct ContentListView: View {
}
}
}
.padding(.horizontal, 13.3)
}
}
.padding(.top, 13.3)
}
.onAppear {
viewModel.userId = userId
viewModel.getCategoryList()
viewModel.getAudioContentList()
}
.popup(isPresented: $viewModel.isShowPopup, type: .toast, position: .bottom, autohideIn: 2) {