I'm not sure what the problem is, as I've done this numerous times with no issues, so I'm thinking I messed something up. I'll show the Product.js component, and the module file, and please let me know if there's anything else I'm missing (for example, there's no next.config.js file either).
Thanks in advance!
Product.js
import { Card } from '@material-ui/core'
import styles from '../styles/Products.module.scss'
export default function Product({ product }) {
console.log(product)
return(
<Card className="product">
<img src={product.main_image} />
{product.name && product.name}
</Card>
)
}
Products.module.scss file
.product {
max-width: 300px;
& img {
width: 100%;
}
}