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