From 5a6db7fdb4533c1e8208479bc913effe07ec17c7 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 5 May 2023 16:18:02 +0800 Subject: [PATCH] :art: update funding --- app/src/config/bazaar.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/config/bazaar.ts b/app/src/config/bazaar.ts index dd4cd7880..5f3bf4d9f 100644 --- a/app/src/config/bazaar.ts +++ b/app/src/config/bazaar.ts @@ -172,7 +172,13 @@ export const bazaar = { repoHash: item.repoHash, downloaded: false, }; - const fundingKey = item.fundingUrl ? Object.keys(item.fundingUrl)[0] : ""; + let fundingUrl = ""; + if (item.fundingUrl) { + fundingUrl = item.fundingUrl.openCollective || item.fundingUrl.patreon || item.fundingUrl.github + if (!fundingUrl && item.fundingUrl.custom && item.fundingUrl.custom.length > 0) { + fundingUrl = item.fundingUrl.custom[0]; + } + } return `
@@ -184,7 +190,7 @@ export const bazaar = { ${item.downloads}
- ${fundingKey ? `` : ""} + ${fundingUrl ? `` : ""}