MCPcopy Create free account
hub / github.com/dailydotdev/apps / onClick

Function onClick

packages/shared/src/components/ShareBar.tsx:69–79  ·  view source on GitHub ↗
(provider: ShareProvider)

Source from the content-addressed store, hash-verified

67 );
68
69 const onClick = async (provider: ShareProvider) => {
70 logShareEvent(provider);
71
72 const shortLink = await getShortUrl(href, cid);
73 const shareLink = getShareLink({
74 provider,
75 link: shortLink,
76 text: post?.title || post?.sharedPost?.title,
77 });
78 window.open(shareLink, '_blank');
79 };
80
81 const logAndCopyLink = async () => {
82 const shortLink = await getShortUrl(href, cid);

Callers 2

RecommendedMentionFunction · 0.70
ShareBarFunction · 0.70

Calls 2

getShareLinkFunction · 0.90
logShareEventFunction · 0.70

Tested by

no test coverage detected