콘텐츠 메인
- 추천 시리즈 UI 추가
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// ContentMainRecommendSeriesView.swift
|
||||
// SodaLive
|
||||
//
|
||||
// Created by klaus on 5/7/24.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ContentMainRecommendSeriesView: View {
|
||||
|
||||
@StateObject private var viewModel = ContentMainRecommendSeriesViewModel()
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
if !viewModel.seriesList.isEmpty {
|
||||
VStack(alignment: .leading, spacing: 13.3) {
|
||||
Text("추천 시리즈")
|
||||
.font(.custom(Font.bold.rawValue, size: 18.3))
|
||||
.foregroundColor(Color.grayee)
|
||||
|
||||
ScrollView(.horizontal, showsIndicators: false) {
|
||||
HStack(alignment: .top, spacing: 13.3) {
|
||||
ForEach(0..<viewModel.seriesList.count, id: \.self) {
|
||||
let item = viewModel.seriesList[$0]
|
||||
SeriesListBigItemView(item: item, isVisibleCreator: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(.bottom, 26.7)
|
||||
.padding(.horizontal, 13.3)
|
||||
} else {
|
||||
EmptyView()
|
||||
}
|
||||
}
|
||||
.onAppear {
|
||||
viewModel.getRecommendSeriesList()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
ContentMainRecommendSeriesView()
|
||||
}
|
Reference in New Issue
Block a user