You are using the ShareLink initialiser that accepts a String or URL as the item parameter.
You instead need to use an initialiser with the preview parameter which accepts a Transferable object and requires a SharePreview.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: