FlipsideCrypto / badger

EVM primitive, protocol and app layer that exposes top-down management mechanisms for on-chain organizations. Badger is the key to the existing gates and locks within Web3.
https://www.trybadger.com/
MIT License
22 stars 1 forks source link

Fix: Image handling #135

Closed masonchain closed 1 year ago

masonchain commented 1 year ago

This PR overhauls a lot of the image handling for ENS Avatars, Org Images, and Badge Images.

No longer will there be an ugly cat, as we now have an actual image error fall back. However, it should never be needed now as the issue with some images being invalid (namely SVG's), has been fixed in the API. The SVG's that were erroring out and having an issue pinning to IPFS are no longer having the issue.

An ImageLoader component was created to provide a placeholder while the images are being pulling from IPFS, so there should be no jumping around of badge/org names or a temporary HTML error if the request takes too long.

A custom ENS profile hook was written as Wagmi's hook has an issue with avatars for some reason.

Tested and ready for merge.

NOTE: This does not retroactively fix the images that were uploaded when the bug was present. The edit form is going to follow immediately after to allow users to address these if desired.

netlify[bot] commented 1 year ago

Deploy Preview for badger-frontend ready!

Name Link
Latest commit 168f91227f5df0b5fe936b66dbeedd02ea2ae302
Latest deploy log https://app.netlify.com/sites/badger-frontend/deploys/636985c4fc7956000875ffe3
Deploy Preview https://deploy-preview-135--badger-frontend.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.