Json-server api does not render images

Asked

Viewed 15 times

0

Good morning, I created an Ecommerce api with json-server and when I do the rendering component on the screen, the api images does not work, my project is divided into two folders, api and web, the images folder is inside api

    {game.map((games) => (
      <CardGame>
        <span> {games.name} </span>
        <img src={games.image} alt="gamesphoto" /> <br />
        <span> R${games.price} </span>
        <button>Adicionar ao Carrinho</button>
      </CardGame>
  ))}

Above is the code I’m using to render the rest of the api data

  • Hi, can you get me more information? Like the method you are using to save your images to JSON Server, what value you expect it to have on 'games.image', etc.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.