Function
getEmailShareLink
(
link: string,
subject: string,
summary?: string,
)
Source from the content-addressed store, hash-verified
| 35 | export const getTelegramShareLink = (link: string, text: string): string => |
| 36 | `https://t.me/share/url?url=${encodeURIComponent(link)}&text=${text}`; |
| 37 | export const getEmailShareLink = ( |
| 38 | link: string, |
| 39 | subject: string, |
| 40 | summary?: string, |
| 41 | ): string => { |
| 42 | const body = summary ? `${summary}\n\n${link}` : link; |
| 43 | |
| 44 | return `mailto:?subject=${encodeURIComponent( |
| 45 | subject, |
| 46 | )}&body=${encodeURIComponent(body)}`; |
| 47 | }; |
| 48 | |
| 49 | interface GetShareLinkParams { |
| 50 | provider: ShareProvider; |
Tested by
no test coverage detected