The code is pretty basic, but using a .onTapGesture() doesn't appear to be the way to go.
The idea is to track the ShareLink interaction for analytics purposes.
ShareLink(item: URL(string: "someUrl")!, message: Text("share_invite_message")) {
Text("detect me 👋")
// ..onTapGesture { let _ = print("tap") } // ShareLink doesn't work
}
// ..onTapGesture { let _ = print("tap") } // tap gesture doesn't work
/* tap gesture doesn't work
.overlay {
Color.clear.onTapGesture {
let _ = print("tap")
}
}
*/