From 9554aca11fc51fbd1228be57ba9db374362d952c Mon Sep 17 00:00:00 2001 From: byhow Date: Wed, 12 Jun 2024 10:51:01 -0700 Subject: [PATCH] chore(collection): locate changes for focusing articles within the collection re #4546 --- .../AuthorSidebar/Collection/index.tsx | 45 +++++++++++-------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/src/views/ArticleDetail/AuthorSidebar/Collection/index.tsx b/src/views/ArticleDetail/AuthorSidebar/Collection/index.tsx index 5e789ccbfa..1ccd259877 100644 --- a/src/views/ArticleDetail/AuthorSidebar/Collection/index.tsx +++ b/src/views/ArticleDetail/AuthorSidebar/Collection/index.tsx @@ -107,25 +107,32 @@ export const Collection = ({ article, collectionId }: CollectionProps) => { loader={} > - {edges?.map(({ node, cursor }, i) => ( - - { - analytics.trackEvent('click_feed', { - type: 'article_detail_author_sidebar_collection', - contentType: 'article', - location: i, - id: node.id, - }) - }} - /> - - ))} + {edges?.map( + ( + { node, cursor }, + i // TODO: find focus factor + ) => ( + + { + analytics.trackEvent('click_feed', { + type: 'article_detail_author_sidebar_collection', + contentType: 'article', + location: i, + id: node.id, + }) + }} + /> + + ) + )}