(item: FeedItem)
| 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, |
no test coverage detected