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

Function getPostTypeForCard

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

Source from the content-addressed store, hash-verified

156};
157
158const getPostTypeForCard = (post?: Post): PostType => {
159 if (!post) {
160 return PostType.Article;
161 }
162
163 if (isSocialTwitterPost(post)) {
164 return PostType.SocialTwitter;
165 }
166
167 return post.type;
168};
169
170type GetTagsProps = {
171 isListFeedLayout: boolean;

Callers 1

FeedItemComponentFunction · 0.85

Calls 1

isSocialTwitterPostFunction · 0.90

Tested by

no test coverage detected