fix(SW-302): fixes after rebase

This commit is contained in:
Matilda Landström
2024-10-01 10:57:22 +02:00
parent a12eea5493
commit 1d8319bfcb
9 changed files with 11 additions and 45 deletions

View File

@@ -11,6 +11,7 @@ import { cardVariants } from "./variants"
import styles from "./card.module.css"
import type { ImageVaultAsset } from "@/types/components/imageVault"
import type { CardProps } from "./card"
export default function Card({
@@ -30,12 +31,13 @@ export default function Card({
const buttonTheme = getTheme(theme)
imageHeight = imageHeight || 320
imageWidth =
/*imageWidth =
imageWidth ||
(backgroundImage
? backgroundImage.dimensions.aspectRatio * imageHeight
: 420)
*/
return (
<article
className={cardVariants({
@@ -49,7 +51,7 @@ export default function Card({
src={backgroundImage.url}
className={styles.image}
alt={backgroundImage.meta.alt || backgroundImage.title}
width={imageWidth}
width={420}
height={imageHeight}
/>
</div>