Skip to content

Commit 6d8c2aa

Browse files
committed
fix: about page does not load contributors
1 parent 9cb04c6 commit 6d8c2aa

File tree

2 files changed

+25
-10
lines changed

2 files changed

+25
-10
lines changed

src/components/pages/about/code-contributors/code-contributor-list.tsx

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,37 @@ type Contributor = {
66
};
77

88
// do not add any real users here
9-
const blacklistedUsernames = ['deepsource-autofix[bot]', 'deepsource-io[bot]', 'renovate[bot]', 'dependabot[bot]'];
9+
const blacklistedUsernames = [
10+
'deepsource-autofix[bot]',
11+
'deepsource-io[bot]',
12+
'renovate[bot]',
13+
'dependabot[bot]',
14+
];
1015

1116
export const CodeContributorList = () => {
1217
const [contributors, setContributors] = useState<Contributor[]>([]);
1318

1419
useEffect(() => {
15-
fetch('./data/contributions.json').then(async (response) => {
20+
fetch('/data/contributions.json').then(async (response) => {
1621
const data = await response.json();
17-
setContributors(data.filter((contributor: Contributor) => !blacklistedUsernames.includes(contributor.login)));
22+
setContributors(
23+
data.filter((contributor: Contributor) => !blacklistedUsernames.includes(contributor.login))
24+
);
1825
});
1926
}, []);
2027

2128
return (
2229
<div className={'flex flex-wrap gap-3'}>
2330
{contributors.map((contributor: Contributor) => (
2431
<div className={'flex flex-col items-center w-24'}>
25-
<img className={'w-24 h-24 aspect-square rounded mb-2'} src={contributor.avatar_url} alt={''} />
26-
<h6 className={"truncate text-nowrap max-w-full"}>{contributor.login}</h6>
32+
<img
33+
className={'w-24 h-24 aspect-square rounded mb-2'}
34+
src={contributor.avatar_url}
35+
alt={''}
36+
/>
37+
<h6 className={'truncate text-nowrap max-w-full'}>{contributor.login}</h6>
2738
</div>
2839
))}
2940
</div>
3041
);
31-
};
42+
};

src/components/pages/about/translations-contributors/translation-constributor-list.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const TranslationContributorList = () => {
99
const [contributors, setContributors] = useState<Contributor[]>([]);
1010

1111
useEffect(() => {
12-
fetch('./data/translation-contributions.json').then(async (response) => {
12+
fetch('/data/translation-contributions.json').then(async (response) => {
1313
const data = await response.json();
1414
setContributors(data);
1515
});
@@ -19,10 +19,14 @@ export const TranslationContributorList = () => {
1919
<div className={'flex flex-wrap gap-3'}>
2020
{contributors.map((contributor: Contributor) => (
2121
<div className={'flex flex-col items-center w-24'}>
22-
<img className={'w-24 h-24 aspect-square rounded mb-2'} src={contributor.avatarUrl} alt={''} />
23-
<h6 className={"truncate text-nowrap max-w-full"}>{contributor.username}</h6>
22+
<img
23+
className={'w-24 h-24 aspect-square rounded mb-2'}
24+
src={contributor.avatarUrl}
25+
alt={''}
26+
/>
27+
<h6 className={'truncate text-nowrap max-w-full'}>{contributor.username}</h6>
2428
</div>
2529
))}
2630
</div>
2731
);
28-
};
32+
};

0 commit comments

Comments
 (0)