Skip to content

Commit

Permalink
#559289: added implementation getEEMarkup into sitecore-jss-nextjs (#…
Browse files Browse the repository at this point in the history
…1232)

* #559289: added implementation getEEMarkup into sitecore-jss-nextjs

* #559289: removed getEEMarkup implementation
  • Loading branch information
sc-ruslanmatkovskyi authored Nov 9, 2022
1 parent 9521deb commit a9422d8
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
Text,
useSitecoreContext,
} from '@sitecore-jss/sitecore-jss-nextjs';
import { getEEMarkup } from '@sitecore-jss/sitecore-jss-react';

interface Fields {
Image: ImageField;
Expand Down Expand Up @@ -38,13 +37,12 @@ export const Banner = (props: ImageProps): JSX.Element => {
?.replace(`width="${props?.fields?.Image?.value?.width}"`, 'width="100%"')
.replace(`height="${props?.fields?.Image?.value?.height}"`, 'height="100%"'),
};
const Image = () => (modifyImageProps.editable ? getEEMarkup(modifyImageProps) : null);
const id = props.params.RenderingIdentifier;

return (
<div className={`component hero-banner ${props.params.styles}`} id={id ? id : undefined}>
<div className="component-content sc-sxa-image-hero-banner" style={backgroundStyle}>
{sitecoreContext.pageEditing ? <Image /> : ''}
{sitecoreContext.pageEditing ? <JssImage field={modifyImageProps} /> : ''}
</div>
</div>
);
Expand Down

0 comments on commit a9422d8

Please sign in to comment.