feat(content): 추천 전체보기를 연결한다
This commit is contained in:
@@ -3,12 +3,13 @@ import SwiftUI
|
||||
struct MainContentAudioHorizontalCardSection: View {
|
||||
let title: String
|
||||
let items: [AudioCardResponse]
|
||||
let action: (() -> Void)?
|
||||
let onTapContent: (Int) -> Void
|
||||
|
||||
var body: some View {
|
||||
if !items.isEmpty {
|
||||
VStack(alignment: .leading, spacing: SodaSpacing.s12) {
|
||||
SectionTitle(title: title)
|
||||
SectionTitle(title: title, action: action)
|
||||
|
||||
ScrollView(.horizontal, showsIndicators: false) {
|
||||
HStack(alignment: .top, spacing: SodaSpacing.s14) {
|
||||
|
||||
@@ -3,6 +3,7 @@ import SwiftUI
|
||||
struct MainContentAudioListCarouselSection: View {
|
||||
let title: String
|
||||
let items: [AudioCardResponse]
|
||||
let action: (() -> Void)?
|
||||
let onTapContent: (Int) -> Void
|
||||
|
||||
private var chunks: [[AudioCardResponse]] {
|
||||
@@ -18,7 +19,7 @@ struct MainContentAudioListCarouselSection: View {
|
||||
var body: some View {
|
||||
if !items.isEmpty {
|
||||
VStack(alignment: .leading, spacing: SodaSpacing.s12) {
|
||||
SectionTitle(title: title)
|
||||
SectionTitle(title: title, action: action)
|
||||
|
||||
ScrollView(.horizontal, showsIndicators: false) {
|
||||
HStack(alignment: .top, spacing: SodaSpacing.s14) {
|
||||
|
||||
@@ -3,12 +3,13 @@ import SwiftUI
|
||||
struct MainContentVoiceOnOnlySection: View {
|
||||
let title: String
|
||||
let items: [OriginalSeriesResponse]
|
||||
let action: (() -> Void)?
|
||||
let onTapSeries: (Int) -> Void
|
||||
|
||||
var body: some View {
|
||||
if !items.isEmpty {
|
||||
VStack(alignment: .leading, spacing: SodaSpacing.s12) {
|
||||
SectionTitle(title: title)
|
||||
SectionTitle(title: title, action: action)
|
||||
|
||||
ScrollView(.horizontal, showsIndicators: false) {
|
||||
HStack(alignment: .top, spacing: SodaSpacing.s14) {
|
||||
|
||||
@@ -4,6 +4,11 @@ struct MainContentRecommendationView: View {
|
||||
let onTapContent: (Int) -> Void
|
||||
let onTapBanner: (AudioBannerResponse) -> Void
|
||||
let onTapSeries: (Int) -> Void
|
||||
let onTapLatestAudioAll: () -> Void
|
||||
let onTapNewAndHotAll: () -> Void
|
||||
let onTapVoiceOnOnlyAll: () -> Void
|
||||
let onTapFreeAudioAll: () -> Void
|
||||
let onTapPointAudioAll: () -> Void
|
||||
|
||||
@StateObject private var viewModel = MainContentRecommendationViewModel()
|
||||
|
||||
@@ -29,30 +34,35 @@ struct MainContentRecommendationView: View {
|
||||
MainContentAudioHorizontalCardSection(
|
||||
title: I18n.MainContentRecommendation.latestAudioSectionTitle,
|
||||
items: recommendations.latestAudios,
|
||||
action: onTapLatestAudioAll,
|
||||
onTapContent: onTapContent
|
||||
)
|
||||
|
||||
MainContentAudioListCarouselSection(
|
||||
title: I18n.MainContentRecommendation.newAndHotSectionTitle,
|
||||
items: recommendations.newAndHotAudios,
|
||||
action: onTapNewAndHotAll,
|
||||
onTapContent: onTapContent
|
||||
)
|
||||
|
||||
MainContentVoiceOnOnlySection(
|
||||
title: I18n.MainContentRecommendation.voiceOnOnlySectionTitle,
|
||||
items: recommendations.originalSeries,
|
||||
action: onTapVoiceOnOnlyAll,
|
||||
onTapSeries: onTapSeries
|
||||
)
|
||||
|
||||
MainContentAudioHorizontalCardSection(
|
||||
title: I18n.MainContentRecommendation.freeAudioSectionTitle,
|
||||
items: recommendations.freeAudios,
|
||||
action: onTapFreeAudioAll,
|
||||
onTapContent: onTapContent
|
||||
)
|
||||
|
||||
MainContentAudioHorizontalCardSection(
|
||||
title: I18n.MainContentRecommendation.pointAudioSectionTitle,
|
||||
items: recommendations.pointAudios,
|
||||
action: onTapPointAudioAll,
|
||||
onTapContent: onTapContent
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user