Skip to content

Commit

Permalink
#31 removing console.logs and adding keys
Browse files Browse the repository at this point in the history
  • Loading branch information
samgildea committed May 14, 2021
1 parent 98b8de8 commit 71cdcd1
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/components/product_page/product-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export default function ProductSection({ data }) {
</ProductsHeading>
<FeaturedProductSection>
<FeaturedProductImage>
{console.log(data.featured_product_image)}
<img
src={data.featured_product_image.url}
alt={data.featured_product_image.alt}
Expand All @@ -33,7 +32,6 @@ export default function ProductSection({ data }) {
<H2>{data.featured_product_name}</H2>
<Body>{data.featured_product_description}</Body>
<FeaturedCTA>
{console.log(data)}
<a href={data.learn_more_button_text_destination}>
{data.learn_more_button_text}
</a>
Expand All @@ -44,10 +42,10 @@ export default function ProductSection({ data }) {
<HomeownerSection>
<Sub1>{data.model_scope[0].model_scope_heading}</Sub1>
<ProductsGroup>
{data.products.map(product => {
{data.products.map((product, id) => {
return (
product.product.document.data.product_type === "Homeowner" && (
<ProductCard href={`/${product.product.document.uid}`}>
<ProductCard key={id} href={`/${product.product.document.uid}`}>
<ProductImage>
<img
src={
Expand Down Expand Up @@ -78,11 +76,10 @@ export default function ProductSection({ data }) {
<CommercialSection>
<Sub1>{data.model_scope[1].model_scope_heading}</Sub1>
<ProductsGroup>
{console.log(data.products)}
{data.products.map(product => {
{data.products.map((product, id) => {
return (
product.product.document.data.product_type === "Commercial" && (
<ProductCard href={`/${product.product.document.uid}`}>
<ProductCard key={id} href={`/${product.product.document.uid}`}>
<ProductImage>
<img
src={
Expand Down

0 comments on commit 71cdcd1

Please sign in to comment.