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

Function getPickPostHref

packages/shared/src/lib/picks.ts:64–77  ·  view source on GitHub ↗
(
  commentsPermalink: string,
  authorId: string,
)

Source from the content-addressed store, hash-verified

62 * attribution and click analytics both work.
63 */
64export const getPickPostHref = (
65 commentsPermalink: string,
66 authorId: string,
67): string => {
68 try {
69 const url = new URL(commentsPermalink);
70 url.searchParams.set('userid', authorId);
71 url.searchParams.set('cid', PICKS_CAMPAIGN_ID);
72
73 return url.toString();
74 } catch {
75 return commentsPermalink;
76 }
77};
78
79/** Whether the account was created within the last week. */
80export const isNewPicksViewer = (

Callers 2

picks.spec.tsFile · 0.90
PickRowFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected