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

Function getPostFromItem

packages/shared/src/features/posts/PostOptionButton.tsx:166–174  ·  view source on GitHub ↗
(item: FeedItem)

Source from the content-addressed store, hash-verified

164 );
165
166 const getPostFromItem = (item: FeedItem) => {
167 if (item?.type === 'post') {
168 return item.post;
169 }
170 if (isBoostedPostAd(item)) {
171 return item.ad.data.post;
172 }
173 return null;
174 };
175
176 return {
177 postIndex: postIndexSelect,

Callers 1

PostOptionButtonContentFunction · 0.85

Calls 1

isBoostedPostAdFunction · 0.90

Tested by

no test coverage detected