File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
features/cards/components/hackernewsCard Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -47,13 +47,13 @@ const ArticleItem = (props: BaseItemPropsType<Article>) => {
4747 < MdAccessTime className = "rowItemIcon" /> { format ( new Date ( item . published_at ) ) }
4848 </ span >
4949 < ClickableItem
50- link = { ` https://news.ycombinator.com/item?id= ${ item . id } ` }
50+ link = { item . canonical_url || ' https://news.ycombinator.com/' }
5151 className = "rowItem rowItemClickable"
5252 analyticsAttributes = { {
5353 [ Attributes . POINTS ] : item . comments_count ,
5454 [ Attributes . TRIGERED_FROM ] : 'card' ,
5555 [ Attributes . TITLE ] : `${ item . title } comments` ,
56- [ Attributes . LINK ] : `https://news.ycombinator.com/ item?id= ${ item . id } ` ,
56+ [ Attributes . LINK ] : item . canonical_url ,
5757 [ Attributes . SOURCE ] : analyticsTag ,
5858 } } >
5959 < BiCommentDetail className = "rowItemIcon" /> { item . comments_count } comments
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ export type BaseEntry = {
4242
4343export type Article = BaseEntry & {
4444 source : string
45+ canonical_url ?: string
4546 original_url ?: string
4647 comments_url ?: string
4748}
You can’t perform that action at this time.
0 commit comments