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

Function getReadPostButtonText

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

Source from the content-addressed store, hash-verified

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