({
item,
index,
row,
column,
columns,
openNewTab,
postMenuIndex,
user,
feedName,
ranking,
toggleUpvote,
toggleDownvote,
onPostClick,
onShare,
onCopyLinkClick,
toggleBookmark,
onMenuClick,
onCommentClick,
onReadArticleClick,
virtualizedNumCards,
wideColSpan,
}: FeedItemComponentProps)
| 261 | }; |
| 262 | |
| 263 | function FeedItemComponent({ |
| 264 | item, |
| 265 | index, |
| 266 | row, |
| 267 | column, |
| 268 | columns, |
| 269 | openNewTab, |
| 270 | postMenuIndex, |
| 271 | user, |
| 272 | feedName, |
| 273 | ranking, |
| 274 | toggleUpvote, |
| 275 | toggleDownvote, |
| 276 | onPostClick, |
| 277 | onShare, |
| 278 | onCopyLinkClick, |
| 279 | toggleBookmark, |
| 280 | onMenuClick, |
| 281 | onCommentClick, |
| 282 | onReadArticleClick, |
| 283 | virtualizedNumCards, |
| 284 | wideColSpan, |
| 285 | }: FeedItemComponentProps): ReactElement | null { |
| 286 | const { logEvent } = useLogContext(); |
| 287 | const inViewRef = useLogImpression( |
| 288 | item, |
| 289 | index, |
| 290 | columns, |
| 291 | column, |
| 292 | row, |
| 293 | feedName, |
| 294 | ranking, |
| 295 | wideColSpan, |
| 296 | ); |
| 297 | |
| 298 | const { shouldUseListFeedLayout, shouldUseListMode } = useFeedLayout(); |
| 299 | const { boostedBy } = useFeedCardContext(); |
| 300 | |
| 301 | if (item.type === FeedItemType.Highlight) { |
| 302 | const HighlightTag = |
| 303 | shouldUseListFeedLayout || shouldUseListMode |
| 304 | ? HighlightList |
| 305 | : HighlightGrid; |
| 306 | const highlightIds = getHighlightIds(item.highlights); |
| 307 | |
| 308 | return ( |
| 309 | <HighlightTag |
| 310 | ref={inViewRef} |
| 311 | highlights={item.highlights} |
| 312 | onReadAllClick={() => { |
| 313 | logEvent( |
| 314 | feedHighlightsLogEvent(LogEvent.Click, { |
| 315 | columns: virtualizedNumCards, |
| 316 | column, |
| 317 | row, |
| 318 | feedName, |
| 319 | ranking, |
| 320 | action: 'read_all_click', |
nothing calls this directly
no test coverage detected