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

Function getPostFromItem

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

Source from the content-addressed store, hash-verified

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

Callers 1

PostOptionButtonContentFunction · 0.85

Calls 1

isBoostedPostAdFunction · 0.90

Tested by

no test coverage detected