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

Function onClick

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

Source from the content-addressed store, hash-verified

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