콘텐츠 메인 - Api 분리
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
//
|
||||
// ContentMainCurationItemView.swift
|
||||
// SodaLive
|
||||
//
|
||||
// Created by klaus on 2023/08/11.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ContentMainCurationItemView: View {
|
||||
|
||||
let item: GetAudioContentCurationResponse
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
HStack(spacing: 0) {
|
||||
Text(item.title)
|
||||
.font(.custom(Font.bold.rawValue, size: 18.3))
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
|
||||
Spacer()
|
||||
|
||||
Image("ic_forward")
|
||||
.resizable()
|
||||
.frame(width: 20, height: 20)
|
||||
.onTapGesture {
|
||||
AppState.shared
|
||||
.setAppStep(
|
||||
step: .curationAll(
|
||||
title: item.title,
|
||||
curationId: item.curationId
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Text(item.description)
|
||||
.font(.custom(Font.medium.rawValue, size: 13))
|
||||
.foregroundColor(Color(hex: "777777"))
|
||||
.padding(.top, 4)
|
||||
|
||||
ScrollView(.horizontal, showsIndicators: false) {
|
||||
LazyHStack(alignment: .top, spacing: 13.3) {
|
||||
ForEach(0..<item.contents.count, id: \.self) {
|
||||
let audioContent = item.contents[$0]
|
||||
ContentMainItemView(item: audioContent)
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(.top, 13.3)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user