feat(SW-3151): Added original to imageSchema and added transform to a more generic image type

Approved-by: Bianca Widstam
Approved-by: Chuma Mcphoy (We Ahead)
Approved-by: Matilda Landström
This commit is contained in:
Erik Tiekstra
2025-09-10 08:29:05 +00:00
parent a5790ee454
commit f04fe467da
35 changed files with 182 additions and 201 deletions

View File

@@ -1,5 +1,6 @@
"use client"
import Image from "@scandic-hotels/design-system/Image"
import ImageFallback from "@scandic-hotels/design-system/ImageFallback"
import { useMyStayStore } from "@/stores/my-stay"
@@ -19,13 +20,17 @@ export default function Img() {
return (
<div className={styles.imageContainer}>
<Image
alt={roomName}
className={styles.image}
height={960}
src={image?.imageSizes.small ?? ""}
width={640}
/>
{image?.src ? (
<Image
alt={roomName}
className={styles.image}
height={960}
src={image.src}
width={640}
/>
) : (
<ImageFallback height="640px" />
)}
</div>
)
}