refactor(SW-296)

This commit is contained in:
Matilda Landström
2024-10-02 10:07:28 +02:00
parent c7146e01a7
commit 22f3656b92
10 changed files with 24 additions and 30 deletions

View File

@@ -15,16 +15,10 @@ export default function CardImage({
<article className={`${styles.container} ${className}`}>
<div className={styles.imageContainer}>
{imageCards.map(
({ backgroundImage }, idx: Number) =>
({ backgroundImage }) =>
backgroundImage && (
<Image
key={
(backgroundImage.title &&
`${backgroundImage.title}-${idx}`) ||
(backgroundImage.meta.caption &&
`${backgroundImage.meta.caption}-${idx}`) ||
backgroundImage.url
}
key={backgroundImage.id}
src={backgroundImage.url}
className={styles.image}
alt={backgroundImage.title}