Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show default favicon if dao doesnt have a custom favicon #1846

Merged
merged 2 commits into from
Oct 16, 2023

Conversation

asktree
Copy link
Contributor

@asktree asktree commented Oct 2, 2023

Previously we would try to use a favicon for a dao, even if they didnt have one, resulting in a missing favicon and a 404 in the console.

Now, we check if it exists first. You might think NextJs has a way to do this without doing a fetch, but it doesn't seem to vercel/next.js#10172

@vercel
Copy link

vercel bot commented Oct 2, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
governance-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 2, 2023 5:26am

@asktree asktree marked this pull request as ready for review October 2, 2023 05:17
const { result: faviconExists } = useAsync(
async () =>
faviconUrl
? fetch(faviconUrl)

Check failure

Code scanning / CodeQL

Server-side request forgery

The [URL](1) of this request depends on a [user-provided value](2).
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(dismissed alert, it is definitely a false positive)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant