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

Function getPostTypeForCard

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

Source from the content-addressed store, hash-verified

151};
152
153const getPostTypeForCard = (post?: Post): PostType => {
154 if (!post) {
155 return PostType.Article;
156 }
157
158 if (isSocialTwitterPost(post)) {
159 return PostType.SocialTwitter;
160 }
161
162 return post.type;
163};
164
165type GetTagsProps = {
166 isListFeedLayout: boolean;

Callers 1

FeedItemComponentFunction · 0.85

Calls 1

isSocialTwitterPostFunction · 0.90

Tested by

no test coverage detected