Reuse shared album cards across screens
This commit is contained in:
1 parent
85e3b3148e
commit
dd733e8e03
5 files changed
+67
-93
No files matched your search
@@ -177,11 +177,11 @@ struct ArtistDetailView: View {
|
||||
LazyHStack(alignment: .top, spacing: 14) {
|
||||
ForEach(viewModel.albums) { album in
|
||||
NavigationLink { AlbumDetailView(albumID: album.id) } label: {
|
||||
VStack(alignment: .leading, spacing: 6) {
|
||||
AlbumArtworkView(url: viewModel.artworkURL(for: album))
|
||||
Text(album.name).font(.subheadline.weight(.medium))
|
||||
.lineLimit(2).foregroundStyle(.primary)
|
||||
}
|
||||
AlbumCardView(
|
||||
album: album,
|
||||
artworkURL: viewModel.artworkURL(for: album),
|
||||
showsArtists: false
|
||||
)
|
||||
.containerRelativeFrame(.horizontal) { length, _ in (length - 40 - 28) / 2.5 }
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
|
||||
Reference in new issue
Block a user