재생목록 상세 페이지 추가

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

@@ -11,9 +11,12 @@ struct ContentBoxView: View {
@StateObject var viewModel = ContentBoxViewModel()
@State private var isShowDetailPlaylist = false
@State private var isShowCreatePlaylist = false
@State private var isReloadData = false
@State private var selectedPlaylistId = 0
var body: some View {
ZStack {
NavigationView {
@@ -55,7 +58,11 @@ struct ContentBoxView: View {
}
} else {
ContentPlaylistListView(
onClickCreate: { isShowCreatePlaylist = true }
onClickCreate: { isShowCreatePlaylist = true },
onClickItem: { playlistId in
selectedPlaylistId = playlistId
isShowDetailPlaylist = true
}
)
.padding(.bottom, 13.3)
.padding(.horizontal, 13.3)
@@ -72,6 +79,14 @@ struct ContentBoxView: View {
reloadData: $isReloadData
)
}
if isShowDetailPlaylist {
ContentPlaylistDetailView(
playlistId: selectedPlaylistId,
isShowing: $isShowDetailPlaylist,
reloadData: $isReloadData
)
}
}
}
}