Skip to content

Commit

Permalink
#37 adding key and updating alts from cms
Browse files Browse the repository at this point in the history
  • Loading branch information
samgildea committed May 15, 2021
1 parent 1dce933 commit 3adaf42
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/templates/product.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export default function Product({ data }) {
<HeroSection>
<ImageContainer>
<img
alt={products.data.product_images[mainImage].image.alt}
src={products.data.product_images[mainImage].image.url}
className="main-image"
/>
Expand All @@ -51,7 +52,6 @@ export default function Product({ data }) {
alt={image.alt}
key={id}
/>
{console.log(image)}
</>
)
})}
Expand Down Expand Up @@ -132,13 +132,12 @@ export default function Product({ data }) {
<div>
{products.data.features.map((feature, id) => {
return (
<Feature>
<Feature key={id}>
<FeatureName>
<Sub1>{feature.feature_name}</Sub1>
</FeatureName>
<FeatureImage>
<img
key={id}
className={id === 0 ? " first-image " : ""}
className={id !== 0 ? " not-image " : ""}
src={feature.feature_image.url}
Expand Down

0 comments on commit 3adaf42

Please sign in to comment.