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

Function getPostTypeForCard

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

Source from the content-addressed store, hash-verified

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

Callers 1

FeedItemComponentFunction · 0.85

Calls 1

isSocialTwitterPostFunction · 0.90

Tested by

no test coverage detected