Use the new presentation logic for grid cards

This commit is contained in:
Jackson Harper 2024-02-05 17:15:15 +08:00
parent 01a51a347e
commit 737692214c

View file

@ -51,22 +51,11 @@ struct LibraryItemGridCardNavigationLink: View {
@ObservedObject var viewModel: HomeFeedViewModel
var body: some View {
PresentationLink(
transition: PresentationLinkTransition.slide(
options: PresentationLinkTransition.SlideTransitionOptions(edge: .trailing,
options:
PresentationLinkTransition.Options(
modalPresentationCapturesStatusBarAppearance: true
))),
destination: {
LinkItemDetailView(
linkedItemObjectID: item.objectID,
isPDF: item.isPDF
)
}, label: {
GridCard(item: LibraryItemData.make(from: item))
}
)
Button(action: {
viewModel.presentItem(item: item)
}, label: {
GridCard(item: LibraryItemData.make(from: item))
})
.buttonStyle(.plain)
.aspectRatio(1.0, contentMode: .fill)
.background(Color.systemBackground)