From 737692214ccb2d372b5e378730b27c3023f3723b Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Mon, 5 Feb 2024 17:15:15 +0800 Subject: [PATCH] Use the new presentation logic for grid cards --- .../LibraryItemListNavigationLink.swift | 21 +++++-------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/Components/LibraryItemListNavigationLink.swift b/apple/OmnivoreKit/Sources/App/Views/Home/Components/LibraryItemListNavigationLink.swift index 4f987d7d1..cb3b384df 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Home/Components/LibraryItemListNavigationLink.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Home/Components/LibraryItemListNavigationLink.swift @@ -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)