feat(content): 추천 오디오 탭을 추가한다

This commit is contained in:
Yu Sung
2026-07-06 14:03:09 +09:00
parent f3cbf42328
commit b42ca61ce4
28 changed files with 1841 additions and 460 deletions

View File

@@ -0,0 +1,64 @@
import SwiftUI
struct MainContentView: View {
let onTapCanCharge: () -> Void
let onTapSearch: () -> Void
let onTapNotificationList: () -> Void
let onTapContent: (Int) -> Void
let onTapBanner: (AudioBannerResponse) -> Void
let onTapSeries: (Int) -> Void
@State private var selectedTab: MainContentTab = .recommendation
var body: some View {
VStack(spacing: 0) {
HomeTitleBar {
HStack(spacing: SodaSpacing.s14) {
Image("ic_bar_cash")
.onTapGesture { onTapCanCharge() }
Image("ic_bar_search")
.onTapGesture { onTapSearch() }
Image("ic_bar_bell")
.onTapGesture { onTapNotificationList() }
}
}
TextTabBar(
items: MainContentTab.allCases,
selectedItem: $selectedTab,
title: { $0.title }
)
tabContent
.frame(maxWidth: .infinity, maxHeight: .infinity)
}
.background(Color.black.ignoresSafeArea())
}
@ViewBuilder
private var tabContent: some View {
switch selectedTab {
case .recommendation:
MainContentRecommendationView(
onTapContent: onTapContent,
onTapBanner: onTapBanner,
onTapSeries: onTapSeries
)
}
}
}
struct MainContentView_Previews: PreviewProvider {
static var previews: some View {
MainContentView(
onTapCanCharge: {},
onTapSearch: {},
onTapNotificationList: {},
onTapContent: { _ in },
onTapBanner: { _ in },
onTapSeries: { _ in }
)
}
}