Skip to content

Commit 62060c2

Browse files
committed
fix ai card comments
1 parent 300a628 commit 62060c2

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

src/features/cards/components/aiCard/ArticleItem.tsx

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { BiCommentDetail } from 'react-icons/bi'
22
import { GoDotFill } from 'react-icons/go'
33
import { MdAccessTime } from 'react-icons/md'
4-
import { CardItemWithActions, CardLink, ClickableItem } from 'src/components/Elements'
4+
import { CardItemWithActions, CardLink } from 'src/components/Elements'
55
import { Attributes } from 'src/lib/analytics'
66
import { useUserPreferences } from 'src/stores/preferences'
77
import { Article, BaseItemPropsType } from 'src/types'
@@ -36,6 +36,13 @@ const ArticleItem = (props: BaseItemPropsType<Article>) => {
3636
<span className="subTitle">{item.title}</span>
3737
</CardLink>
3838
</p>
39+
{listingMode === 'compact' && (
40+
<div className="rowDetails">
41+
<span className="rowItem capitalize">
42+
<GoDotFill className="rowItemIcon" /> {item.source}
43+
</span>
44+
</div>
45+
)}
3946
{listingMode === 'normal' && (
4047
<div className="rowDetails">
4148
<span className="rowItem capitalize">
@@ -44,18 +51,10 @@ const ArticleItem = (props: BaseItemPropsType<Article>) => {
4451
<span className="rowItem" title={new Date(item.published_at).toUTCString()}>
4552
<MdAccessTime className="rowItemIcon" /> {format(new Date(item.published_at))}
4653
</span>
47-
<ClickableItem
48-
link={`https://news.ycombinator.com/item?id=${item.id}`}
49-
className="rowItem rowItemClickable"
50-
analyticsAttributes={{
51-
[Attributes.POINTS]: item.reactions,
52-
[Attributes.TRIGERED_FROM]: 'card',
53-
[Attributes.TITLE]: `${item.title} comments`,
54-
[Attributes.LINK]: `https://news.ycombinator.com/item?id=${item.id}`,
55-
[Attributes.SOURCE]: analyticsTag,
56-
}}>
57-
<BiCommentDetail className="rowItemIcon" /> {item.comments} comments
58-
</ClickableItem>
54+
<span className="rowItem">
55+
<BiCommentDetail className={'rowTitleIcon'} />
56+
{item.comments} comments
57+
</span>
5958
</div>
6059
)}
6160
</>

0 commit comments

Comments
 (0)