Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions apps/site/components/Common/Supporters/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ type SupportersListProps = {

const SupportersList: FC<SupportersListProps> = ({ supporters }) => (
<div className="flex max-w-full flex-wrap items-center justify-center gap-1">
{supporters.map(({ name, image }, i) => (
<Avatar nickname={name} image={image} key={`${name}-${i}`} />
{supporters.map(({ name, image, profile }, i) => (
<Avatar
nickname={name}
image={image}
key={`${name}-${i}`}
url={profile}
/>
))}
</div>
);
Expand Down
6 changes: 5 additions & 1 deletion apps/site/next-data/generators/supportersData.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ async function fetchOpenCollectiveData() {

const members = payload
.filter(({ role, isActive }) => role === 'BACKER' && isActive)
.map(({ name, website, image }) => ({
.sort((a, b) => {
return b.totalAmountDonated - a.totalAmountDonated; //descending
})
.map(({ name, website, image, profile }) => ({
name,
image,
url: website,
profile,
source: 'opencollective',
}));

Expand Down
1 change: 1 addition & 0 deletions apps/site/types/partners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export type Supporters = {
name: string;
image: string;
url: string;
profile: string;
source: 'opencollective' | 'github';
};

Expand Down
Loading