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

Function getPostFromItem

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

Source from the content-addressed store, hash-verified

156 );
157
158 const getPostFromItem = (item: FeedItem) => {
159 if (item?.type === 'post') {
160 return item.post;
161 }
162 if (isBoostedPostAd(item)) {
163 return item.ad.data.post;
164 }
165 return null;
166 };
167
168 return {
169 postIndex: postIndexSelect,

Callers 1

PostOptionButtonContentFunction · 0.85

Calls 1

isBoostedPostAdFunction · 0.90

Tested by

no test coverage detected