Skip to content

Commit

Permalink
fix: project page logo requests sometimes failing
Browse files Browse the repository at this point in the history
  • Loading branch information
tomquirk committed Jan 13, 2024
1 parent 448945b commit 511db7f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/ProjectLogo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,20 @@ export default function ProjectLogo({
MAINNET_URI_OVERRIDES[projectId]
)
return MAINNET_URI_OVERRIDES[projectId]

if (
projectId &&
readNetwork.name === NetworkName.goerli &&
GOERLI_URI_OVERRIDES[projectId]
)
return GOERLI_URI_OVERRIDES[projectId]

if (!uri) return `/api/juicebox/pv/${pv}/project/${projectId}/logo`
if (!uri) {
if (projectId && pv) {
return `/api/juicebox/pv/${pv}/project/${projectId}/logo`
}

return undefined
}

// Some older JB projects have a logo URI hardcoded to use Pinata.
// JBM no longer uses Pinata.
Expand Down

2 comments on commit 511db7f

@vercel
Copy link

@vercel vercel bot commented on 511db7f Jan 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 511db7f Jan 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.