From 8a35746d0063126ddf3a1696fde1d3a6d484a7d5 Mon Sep 17 00:00:00 2001 From: Ruslan Matkovskyi Date: Wed, 13 Dec 2023 12:33:28 +0100 Subject: [PATCH] [templates/nextjs-sxa] fixed eslint errors --- .../src/templates/nextjs-sxa/src/components/Image.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/create-sitecore-jss/src/templates/nextjs-sxa/src/components/Image.tsx b/packages/create-sitecore-jss/src/templates/nextjs-sxa/src/components/Image.tsx index 749e3ccf4a..cb29d12557 100644 --- a/packages/create-sitecore-jss/src/templates/nextjs-sxa/src/components/Image.tsx +++ b/packages/create-sitecore-jss/src/templates/nextjs-sxa/src/components/Image.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { CSSProperties } from 'react'; import { Image as JssImage, Link as JssLink, @@ -35,7 +35,9 @@ export const Banner = (props: ImageProps): JSX.Element => { isPageEditing && props.fields?.Image?.value?.class === 'scEmptyImage' ? 'hero-banner-empty' : ''; - const backgroundStyle = props?.fields?.Image?.value?.src && { backgroundImage: `url('${props.fields.Image.value.src}')` }; + const backgroundStyle = (props?.fields?.Image?.value?.src && { + backgroundImage: `url('${props.fields.Image.value.src}')`, + }) as CSSProperties; const modifyImageProps = { ...props.fields.Image, editable: props?.fields?.Image?.editable