Skip to content

Commit f419e15

Browse files
committed
fix: update supporters data mapping to include source and adjust URL handling
1 parent 29829ce commit f419e15

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

apps/site/components/Common/Supporters/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ type SupportersListProps = {
1111

1212
const SupportersList: FC<SupportersListProps> = ({ supporters }) => (
1313
<div className="flex max-w-full flex-wrap items-center justify-center gap-1">
14-
{supporters.map(({ name, image, url }) => (
14+
{supporters.map(({ name, image, source, url }) => (
1515
<Avatar
1616
nickname={name}
1717
fallback={getAcronymFromString(name)}
1818
image={image}
19-
key={name}
19+
key={`${source}:${name}`}
2020
url={url}
2121
/>
2222
))}

apps/site/next-data/generators/supportersData.mjs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,11 @@ async function fetchOpenCollectiveData() {
2020
const members = payload
2121
.filter(({ role, isActive }) => role === 'BACKER' && isActive)
2222
.sort((a, b) => b.totalAmountDonated - a.totalAmountDonated)
23-
.map(({ name, image, profile, website }) => ({
23+
.map(({ name, image, profile }) => ({
2424
name,
2525
image,
26-
url: website,
2726
// If profile starts with the guest- prefix, it's a non-existing account
28-
profile: profile.startsWith('https://opencollective.com/guest-')
27+
url: profile.startsWith('https://opencollective.com/guest-')
2928
? undefined
3029
: profile,
3130
source: 'opencollective',

0 commit comments

Comments
 (0)