재생목록 상세 페이지 추가

This commit is contained in:
Yu Sung
2024-12-10 03:01:40 +09:00
parent 0fdb9edd23
commit d03fee372a
15 changed files with 447 additions and 5 deletions

View File

@@ -9,9 +9,10 @@ import SwiftUI
struct ContentPlaylistListView: View {
@ObservedObject var viewModel = ContentPlaylistListViewModel()
@StateObject var viewModel = ContentPlaylistListViewModel()
let onClickCreate: () -> Void
let onClickItem: (Int) -> Void
var body: some View {
BaseView(isLoading: $viewModel.isLoading) {
@@ -61,6 +62,10 @@ struct ContentPlaylistListView: View {
ForEach(0..<viewModel.playlists.count, id: \.self) { index in
let playlist = viewModel.playlists[index]
ContentPlaylistItemView(item: playlist)
.contentShape(Rectangle())
.onTapGesture {
onClickItem(playlist.id)
}
}
}
}
@@ -89,5 +94,5 @@ struct ContentPlaylistListView: View {
}
#Preview {
ContentPlaylistListView(onClickCreate: {})
ContentPlaylistListView(onClickCreate: {}, onClickItem: { _ in })
}