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

Function onClick

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

Source from the content-addressed store, hash-verified

59 );
60
61 const onClick = async (provider: ShareProvider) => {
62 logShareEvent(provider);
63
64 const shortLink = await getShortUrl(href, cid);
65 const shareLink = getShareLink({
66 provider,
67 link: shortLink,
68 text: post?.title || post?.sharedPost?.title,
69 });
70 window.open(shareLink, '_blank');
71 };
72
73 const logAndCopyLink = async () => {
74 const shortLink = await getShortUrl(href, cid);

Callers 2

RecommendedMentionFunction · 0.70
ShareBarFunction · 0.70

Calls 3

getShareLinkFunction · 0.90
openMethod · 0.80
logShareEventFunction · 0.70

Tested by

no test coverage detected