adrianhajdin / project_professional_portfolio

This is a code repository for the corresponding YouTube video. In this tutorial we are going to build and deploy a real time chat application. Covered topics: React.js, SCSS, Framer Motion, Sanity
https://jsmastery.pro
2.07k stars 496 forks source link

The provided `src` attribute is an unsupported type ImageUrlBuilder. #37

Open Mr-Nobody1 opened 2 years ago

Mr-Nobody1 commented 2 years ago

image

RoyetteMillares commented 2 years ago

we have the same issue im searching in the SANITY DOCS there's no solution for that

bond0887 commented 2 years ago

hey @RoyetteMillares @Mr-Nobody1, did any of you find any solution in this?

RoyetteMillares commented 2 years ago

wait i cant remember but i will check tomorrow btw thank you so much for replying

On Thu, Nov 3, 2022, 7:25 PM bond0887 @.***> wrote:

hey @RoyetteMillares https://github.com/RoyetteMillares @Mr-Nobody1 https://github.com/Mr-Nobody1, did any of you find any solution in this?

— Reply to this email directly, view it on GitHub https://github.com/adrianhajdin/project_professional_portfolio/issues/37#issuecomment-1301960555, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ4KHKHDYJC2B4CIYNAVDBTWGOOJNANCNFSM57Z6XOWA . You are receiving this because you were mentioned.Message ID: @.*** com>

Mr-Nobody1 commented 2 years ago

hey @RoyetteMillares @Mr-Nobody1, did any of you find any solution in this?

No, nothing worked for me.

bond0887 commented 2 years ago

using async await instead of .then worked for me.

const fetchAbouts = async () => { const query = '*[_type == "abouts"]'; setAbouts(await client.fetch(query)); }

useEffect(() => { fetchAbouts(); }, []);

This code worked for me but I don't know the logic behind this, if anyone can explain it would be great. TIA

smallbitmatters commented 2 years ago

image image

I have not changed anything from the time I finished coding and ran npm audit fix --force since the errors in the terminal ticks me. Anyone has a solution for this?

mdnaeem95 commented 2 years ago

Hi there, there is a discrepancy between the schema set up in sanity and the attribute being called here.

In the testimonial schema, the name for the image is "imageurl", but in the code its given as (testimonials[currentIndex].imgurl).

Simply change the imgurl to "imageurl" (or you can change the schema, up to you), and it should work. Was stuck on so long for this as well.

RoyetteMillares commented 2 years ago

Okay okay thank you for the information

ChimexOji commented 1 year ago

Thanks a lot @mdnaeem95 . This was very helpful