Skip to content

Commit

Permalink
Merge pull request #962 from levelkdev/bugfix/#961-marque-unique-key-…
Browse files Browse the repository at this point in the history
…error

Added unique keys to array map of elements
  • Loading branch information
wixzi committed May 10, 2022
2 parents cb7f69d + 95c0fce commit 91f9042
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/components/LandingPageComponents/layout/Hero.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, useEffect } from 'react'
import React, { useState, useEffect, Fragment } from 'react'
import styled, { keyframes } from 'styled-components'
import { HeroContent, RoutingThroughContent } from './../../../utils/ui-constants'
import { gradients, breakpoints } from '../../../utils/theme'
Expand Down Expand Up @@ -90,9 +90,9 @@ const Hero = props => {
<h1>{HeroContent.mainText}</h1>
<ul className="hero-logos-list">
{logosArrays.map((item, key) => (
<div key={key} className="hero-logo-group">
<div key={key + '-hero'} className="hero-logo-group">
{item.map((logo, key) => (
<li key={key}>
<li key={`${logo.title}-${key}`}>
<img src={logo.img} title={logo.title} alt="Logos" />
</li>
))}
Expand All @@ -101,7 +101,7 @@ const Hero = props => {
</ul>
<ul className="hero-button-list">
{HeroContent.heroButtons.map((button, key) => (
<li key={key}>
<li key={`${button.label}-${key}`}>
<Button type={button.type} label={button.label} to={button.href} />
</li>
))}
Expand All @@ -121,12 +121,12 @@ const Hero = props => {
<div className="routing-through-body">
<Marquee speed={50} gradientColor={[12, 11, 18]}>
<div className="marquee-inner">
{[...Array(3)].map(() => (
<>
{[...Array(3)].map((_, index) => (
<Fragment key={index}>
{RoutingThroughContent.companies.map((company, key) => (
<img key={key} src={company.img} alt="Routing through..." />
<img key={`${key}-${company.title}`} src={company.img} alt={`Routing through...`} />
))}
</>
</Fragment>
))}
</div>
</Marquee>
Expand Down

0 comments on commit 91f9042

Please sign in to comment.