Skip to content

Commit 893d66b

Browse files
committed
improve the medium card ui
1 parent 52f0863 commit 893d66b

1 file changed

Lines changed: 15 additions & 24 deletions

File tree

src/cards/MediumCard.js

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ import PreferencesContext from '../preferences/PreferencesContext'
77
import CardLink from '../components/CardLink'
88
import { BiCommentDetail } from 'react-icons/bi'
99
import { MdAccessTime } from 'react-icons/md'
10-
import { AiTwotoneHeart } from 'react-icons/ai'
11-
import { IoMdHand } from 'react-icons/io'
10+
import { MdWavingHand } from 'react-icons/md'
1211
import CardItemWithActions from '../components/CardItemWithActions'
13-
import ColoredLanguagesBadge from '../components/ColoredLanguagesBadge'
1412
import SelectableCard from '../components/SelectableCard'
1513
import { GLOBAL_TAG, MY_LANGUAGES_TAG, MAX_MERGED_ITEMS_PER_LANGUAGE } from '../Constants'
1614
import { mergeMultipleDataSources } from '../utils/DataUtils'
@@ -30,33 +28,26 @@ const ArticleItem = ({ item, index, analyticsTag }) => {
3028
<CardLink link={item.mediumUrl} analyticsSource={analyticsTag}>
3129
{listingMode === 'compact' && (
3230
<div className="counterWrapper">
33-
<AiTwotoneHeart />
34-
<span className="value">{item.totalReactions || 0}</span>
31+
<MdWavingHand />
32+
<span className="value">{item.clapCount || 0}</span>
3533
</div>
3634
)}
3735
<div className="subTitle">{item.title}</div>
3836
</CardLink>
3937

4038
{listingMode === 'normal' && (
41-
<>
42-
<p className="rowDescription">
43-
<span className="rowItem">
44-
<MdAccessTime className={'rowTitleIcon'} />
45-
{format(new Date(item.latestPublishedAt))}
46-
</span>
47-
<span className="rowItem">
48-
<BiCommentDetail className={'rowTitleIcon'} />
49-
{item.replyCount || 0} comments
50-
</span>
51-
<span className="rowItem">
52-
<IoMdHand className={'rowTitleIcon'} />
53-
{item.totalReactions || 0} claps
54-
</span>
55-
</p>
56-
<p className="rowDetails">
57-
<ColoredLanguagesBadge languages={item.tag_list} />
58-
</p>
59-
</>
39+
<p className="rowDetails">
40+
<span className="rowItem mediumRowItem">
41+
<MdWavingHand className={'rowItemIcon'} /> {item.clapCount || 0} claps
42+
</span>
43+
<span className="rowItem">
44+
<BiCommentDetail className={'rowItemIcon'} /> {item.commentsCount || 0} comments
45+
</span>
46+
<span className="rowItem">
47+
<MdAccessTime className={'rowItemIcon'} />
48+
{format(new Date(item.latestPublishedAt))}
49+
</span>
50+
</p>
6051
)}
6152
</>
6253
}

0 commit comments

Comments
 (0)