( commentsPermalink: string, authorId: string, )
| 62 | * attribution and click analytics both work. |
| 63 | */ |
| 64 | export 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. */ |
| 80 | export const isNewPicksViewer = ( |
no outgoing calls
no test coverage detected