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

Function getPostTitle

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

Source from the content-addressed store, hash-verified

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

Callers 3

ReadingDrawerFunction · 0.90
buildSourcePostCommandFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected