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

Unable to resolve image URL from source (undefined) at 1:28 min #100

Open
Madzeedy opened this issue Mar 19, 2023 · 4 comments
Open

Unable to resolve image URL from source (undefined) at 1:28 min #100

Madzeedy opened this issue Mar 19, 2023 · 4 comments

Comments

@Madzeedy
Copy link

I have tried to get the results in the terminal it is working but in the browser rendering the image details brings that error, any help would be highly appreciated.

@Madzeedy Madzeedy changed the title Unable to resolve image URL from source (undefined) Unable to resolve image URL from source (undefined) at 1:28 min Mar 19, 2023
@SoumyaSubhrajit
Copy link

@Madzeedy gave me more details on this issue so that I can help you with this.

@Madzeedy
Copy link
Author

Madzeedy commented Apr 20, 2023 via email

@SoumyaSubhrajit
Copy link

@Madzeedy bruh, You miss a bunch for code in slug.js , please revisit the video and try to write the code as well. You forgot to iterate the image to display an image in the product detail part.

for example, you miss this code..

 {/* THIS IS FOR THE SMALL IMAGES THAT APPPER IN THE PRODUCTS DEATILS ... */}
          <div className="small-images-container">
            {image?.map((item, i) => (
              <img
                // IF YOU CHANGE THE VALUE OF 'i' THEN THE IMAGE WILL CHANGE ACCORDINGLY..
                key={i}
                src={urlFor(item)}
                className={i === index ? 'small-image selected-image' : 'small-image'}
                // THIS IS THE EVENT WHEN THE MOUSEPOINT THE REALTEED OBJECT
                onMouseEnter={() => setIndex(i)}
              />
            ))}
          </div>

@tommichaels
Copy link

Hello @Madzeedy , Have you fixed this? I just fixed mine so I was wandering if you've done yours because this was a pain to fix in Next13 and it's a simple fix.

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

No branches or pull requests

3 participants