chec / commercejs-nextjs-demo-store

Commerce demo store built for the Jamstack. Built with Commerce.js, Next.js, and can be one-click deployed to Netlify. Includes product catalog, customer login, categories, variants, cart, checkout, payments (Stripe) order confirmation, and printable receipts.
https://commercejs-demo-store.netlify.app/
BSD 3-Clause "New" or "Revised" License
1.07k stars 206 forks source link

Categories images not loading #291

Open lborruto opened 2 years ago

lborruto commented 2 years ago

Hi, looking to get my own images working in the CategoryBanner, nothing works despite reading the instructions. My collection.js look like this :

export default [
  {
    image: '/images/collection/1.png',
    slug: 'salle-de-bain',
    link: '/collection#salle-de-bain',
    translateRatio: 30,
    count: 3
  },
  {
    image: '/images/collection/2.png',
    slug: 'cuisine',
    link: '/collection#cuisine',
    translateRatio: 0,
    count: 3
  },
  {
    image: '/images/collection/3.png',
    slug: 'mode',
    link: '/collection#mode',
    translateRatio: 60,
    count: 2
  }
];

I double checked the spelling and path but everything seems ok. Maybe I'm doing this wrong. Categories are also set in the Chec dashboard:

image

Dev-Dz27 commented 1 year ago

inside CategoryBanner.js exactly under the Link, change item.meta.image to item.assets[0].url