Merged in fix/SW-2500-sync-hotel-images-and- (pull request #2569)
fix(SW-2500): Fixed no image gives error on confirmation and booking page * fix(SW-2500): Fixed no image gives error on confirmation and booking page Approved-by: Anton Gunnarsson Approved-by: Matilda Landström
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
import NextImage, { type ImageLoaderProps } from "next/image"
|
||||
|
||||
import ImageFallback from "./ImageFallback"
|
||||
|
||||
import type { CSSProperties } from "react"
|
||||
|
||||
import type { ImageProps } from "@/types/components/image"
|
||||
@@ -27,5 +29,9 @@ export default function Image({ focalPoint, style, ...props }: ImageProps) {
|
||||
}
|
||||
: { ...style }
|
||||
|
||||
if (!props.src) {
|
||||
return <ImageFallback />
|
||||
}
|
||||
|
||||
return <NextImage {...props} style={styles} loader={imageLoader} />
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user