인기 콘텐츠 전체 보기 - 정렬 추가

This commit is contained in:
Yu Sung
2023-11-03 14:45:51 +09:00
parent cf7f1527b7
commit 27df89d78e
4 changed files with 68 additions and 2 deletions

View File

@@ -31,6 +31,14 @@ struct ContentRankingAllView: View {
.background(Color(hex: "222222"))
.padding(.top, 13.3)
ContentMainRankingSortView(
sorts: viewModel.contentRankingSortList,
selectSort: { viewModel.selectedContentRankingSort = $0 },
selectedSort: $viewModel.selectedContentRankingSort
)
.frame(width: screenSize().width - 26.7)
.padding(.vertical, 16.7)
ScrollView(.vertical, showsIndicators: false) {
VStack(spacing: 20) {
ForEach(0..<viewModel.contentRankingItemList.count, id: \.self) { index in
@@ -141,6 +149,7 @@ struct ContentRankingAllView: View {
}
}
.onAppear {
viewModel.getContentRankingSortType()
viewModel.getContentRanking()
}
}