neynarxyz / react

React SDK for Farcaster components - powered by Neynar APIs
https://neynar-react.vercel.app
MIT License
19 stars 14 forks source link

[Optimization] If castData.author.pfp_url is null, a default avatar should be displayed or controlled from props. #10

Closed linrz closed 1 month ago

linrz commented 2 months ago

If castData.author.pfp_url is null, the render result is <img alt="null Avatar" />, can we optimize it and set it to be the same as the default avatar of warpcast? Or allow developers to control it from component props.

dylsteck commented 2 months ago

Hey @linrz, thanks for creating this issue! We have an active fix for this bug and should have better resolution for castData.author.pfp_url being null or blank in the future.

dylsteck commented 1 month ago

Hey @linrz! I wanted to circle back and let you know that our latest release(v0.6.0) solves this problem by falling back to a skeleton pfp if there isn't a valid value at castData.author.pfp_url.