()
| 37 | const { logEvent } = useLogContext(); |
| 38 | |
| 39 | const onCopyLink = () => { |
| 40 | logEvent( |
| 41 | postLogEvent(LogEvent.SharePost, post, { |
| 42 | extra: { provider: ShareProvider.CopyLink, origin }, |
| 43 | }), |
| 44 | ); |
| 45 | // `shorten`, not an awaited short URL: awaiting the shortener first ends |
| 46 | // the task that handled the click, and Safari refuses the write after |
| 47 | // that. The permalink lands immediately and the tracked link replaces it. |
| 48 | copyLink({ |
| 49 | link: post.commentsPermalink, |
| 50 | shorten: true, |
| 51 | cid: ReferralCampaignKey.SharePost, |
| 52 | }); |
| 53 | }; |
| 54 | |
| 55 | return ( |
| 56 | <> |
nothing calls this directly
no test coverage detected