59 lines
1.8 KiB
Swift
59 lines
1.8 KiB
Swift
//
|
|
// ContentBoxView.swift
|
|
// SodaLive
|
|
//
|
|
// Created by klaus on 12/7/24.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct ContentBoxView: View {
|
|
|
|
@StateObject var viewModel = ContentBoxViewModel()
|
|
|
|
var body: some View {
|
|
NavigationView {
|
|
VStack(spacing: 13.3) {
|
|
DetailNavigationBar(title: "내 보관함")
|
|
|
|
ScrollView(.horizontal, showsIndicators: false) {
|
|
HStack(spacing: 12) {
|
|
ContentBoxTabView(
|
|
title: "구매목록",
|
|
isSelected: viewModel.currentTab == .orderlist
|
|
)
|
|
.onTapGesture {
|
|
if viewModel.currentTab != .orderlist {
|
|
viewModel.currentTab = .orderlist
|
|
}
|
|
}
|
|
|
|
ContentBoxTabView(
|
|
title: "재생목록",
|
|
isSelected: viewModel.currentTab == .playlist
|
|
)
|
|
.onTapGesture {
|
|
if viewModel.currentTab != .playlist {
|
|
viewModel.currentTab = .playlist
|
|
}
|
|
}
|
|
}
|
|
.padding(.horizontal, 13.3)
|
|
}
|
|
|
|
if viewModel.currentTab == .playlist {
|
|
ContentPlaylistListView()
|
|
.padding(.bottom, 13.3)
|
|
.padding(.horizontal, 13.3)
|
|
} else {
|
|
OrderListAllInnerView()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
ContentBoxView()
|
|
}
|