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

Function getPostTitle

packages/shared/src/graphql/posts.ts:155–163  ·  view source on GitHub ↗
(
  post:
    | {
        title?: string | null;
        sharedPost?: { title?: string | null } | null;
      }
    | undefined
    | null,
)

Source from the content-addressed store, hash-verified

153 : post;
154
155export const getPostTitle = (
156 post:
157 | {
158 title?: string | null;
159 sharedPost?: { title?: string | null } | null;
160 }
161 | undefined
162 | null,
163): string | undefined => post?.title || post?.sharedPost?.title || undefined;
164
165export const getReadPostButtonText = (post: Post): string => {
166 if (isVideoPost(post)) {

Callers 3

ReadingDrawerFunction · 0.90
buildSourcePostCommandFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected