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

Function getPostTypeForCard

packages/shared/src/components/FeedItemComponent.tsx:131–141  ·  view source on GitHub ↗
(post?: Post)

Source from the content-addressed store, hash-verified

129}
130
131const getPostTypeForCard = (post?: Post): PostType => {
132 if (!post) {
133 return PostType.Article;
134 }
135
136 if (isSocialTwitterPost(post)) {
137 return PostType.SocialTwitter;
138 }
139
140 return post.type;
141};
142
143type GetTagsProps = {
144 isListFeedLayout: boolean;

Callers 1

FeedItemComponentFunction · 0.85

Calls 1

isSocialTwitterPostFunction · 0.90

Tested by

no test coverage detected