Skip to content

Commit d6f7cf8

Browse files
committed
feat: update RepoFeedItem to use GitHub logo image and style adjustments
1 parent a62781f commit d6f7cf8

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/features/feed/components/feed.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@
103103
background: var(--card-background-color);
104104
border-bottom: 12px solid green;
105105
}
106+
.repo .logo {
107+
width: 64px;
108+
height: 64px;
109+
border-radius: 4px;
110+
margin: 0 auto;
111+
}
106112
.repo .title {
107113
font-size: 1.4rem;
108114
color: var(--card-header-text-color);

src/features/feed/components/feedItems/RepoFeedItem.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { SiGithub } from 'react-icons/si'
21
import { VscRepoForked, VscStarFull } from 'react-icons/vsc'
32
import { CardItemWithActions, ColoredLanguagesBadge } from 'src/components/Elements'
43
import { useUserPreferences } from 'src/stores/preferences'
@@ -13,7 +12,7 @@ function numberWithCommas(x: number | string) {
1312
export const RepoFeedItem = (props: BaseItemPropsType<GithubFeedItemData>) => {
1413
const { item, analyticsTag, className } = props
1514
const { listingMode } = useUserPreferences()
16-
15+
const repoOwner = item.url.split('/')[3]
1716
return (
1817
<div className={className}>
1918
<CardItemWithActions
@@ -26,7 +25,7 @@ export const RepoFeedItem = (props: BaseItemPropsType<GithubFeedItemData>) => {
2625
source="github"
2726
fallbackImage={
2827
<div className="rowCover repo">
29-
<SiGithub size={40} />
28+
<img src={`https://github.com/${repoOwner}.png?size=128`} className="logo" />
3029
<p className="title">{item.title}</p>
3130
<p className="description">{item.description}</p>
3231
<div className="details">

0 commit comments

Comments
 (0)