fix(SW-302): fixes after rebase
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user