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

Function getReadArticleHref

packages/shared/src/graphql/posts.ts:131–134  ·  view source on GitHub ↗
(
  post: Pick<Post, 'type' | 'subType' | 'sharedPost' | 'permalink'>,
)

Source from the content-addressed store, hash-verified

129 * otherwise the post's own permalink.
130 */
131export const getReadArticleHref = (
132 post: Pick<Post, 'type' | 'subType' | 'sharedPost' | 'permalink'>,
133): string | undefined =>
134 getPostReadTarget(post).target?.permalink ?? post.permalink;
135
136export const getReadPostButtonText = (post: Post): string => {
137 if (isVideoPost(post)) {

Callers 3

PostHeaderActionsFunction · 0.90
ReaderPostLayoutFunction · 0.90
PostFocusCardFunction · 0.90

Calls 1

getPostReadTargetFunction · 0.85

Tested by

no test coverage detected