Skip to content

Commit 232fa20

Browse files
committed
feat: add GitHub avatar image to repository card
1 parent cca0aa8 commit 232fa20

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

src/assets/App.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,14 @@ a {
635635
color: #99a2ac;
636636
}
637637

638+
.rowTitleGithubIcon {
639+
width: 16px;
640+
height: 16px;
641+
border-radius: 4px;
642+
vertical-align: sub;
643+
margin-right: 6px;
644+
}
645+
638646
.backToHome {
639647
display: flex;
640648
order: 4;

src/features/cards/components/githubCard/RepoItem.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { CardItemWithActions, CardLink } from 'src/components/Elements'
22

3-
import { VscRepo, VscRepoForked, VscStarFull } from 'react-icons/vsc'
3+
import { VscRepoForked, VscStarFull } from 'react-icons/vsc'
44
import { ColoredLanguagesBadge } from 'src/components/Elements'
55
import { Attributes } from 'src/lib/analytics'
66
import { useUserPreferences } from 'src/stores/preferences'
@@ -30,7 +30,10 @@ const RepoItem = ({ item, selectedTag, analyticsTag }: BaseItemPropsType<Reposit
3030
[Attributes.SOURCE]: analyticsTag,
3131
[Attributes.LANGUAGE]: selectedTag?.value,
3232
}}>
33-
<VscRepo className={'rowTitleIcon'} />
33+
<img
34+
src={`https://github.com/${item.owner}.png?size=64`}
35+
className="rowTitleGithubIcon"
36+
/>
3437
{item.owner}/{item.name}
3538
</CardLink>
3639
<p className="rowDescription">{item.description}</p>

0 commit comments

Comments
 (0)