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

Function getReadPostButtonText

packages/shared/src/graphql/posts.ts:165–175  ·  view source on GitHub ↗
(post: Post)

Source from the content-addressed store, hash-verified

163): string | undefined => post?.title || post?.sharedPost?.title || undefined;
164
165export const getReadPostButtonText = (post: Post): string => {
166 if (isVideoPost(post)) {
167 return 'Watch video';
168 }
169
170 if (isPostOrSharedPostTwitter(post)) {
171 return 'Read on';
172 }
173
174 return 'Read post';
175};
176
177export const translateablePostFields = [
178 'title',

Callers 9

FocusColumnFunction · 0.90
PostCardHeaderFunction · 0.90
useReadPostButtonTextFunction · 0.90
PrivatePostFunction · 0.90
PostHeaderActionsFunction · 0.90
PostHybridColumnFunction · 0.90
posts.spec.tsFile · 0.90

Calls 2

isVideoPostFunction · 0.85

Tested by

no test coverage detected