Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#545156: added fix for sitecore-jss and reverted fix #1203

Merged
merged 1 commit into from
Oct 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,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 = () => getEEMarkup(modifyImageProps);
const Image = () => modifyImageProps.editable ? getEEMarkup(modifyImageProps) : null;

return (
<div className={`component hero-banner ${props.params.styles}`}>
<div className="component-content sc-sxa-image-hero-banner" style={backgroundStyle}>
{sitecoreContext.pageState === 'edit' ? <Image /> : ''}
{sitecoreContext.pageEditing ? <Image /> : ''}
</div>
</div>
);
Expand All @@ -54,7 +54,7 @@ export const Default = (props: ImageProps): JSX.Element => {

if (props.fields) {
const Image = () => <JssImage field={props.fields.Image} />;
const id = props.params.RenderingIdentifier;
const id = props.params.RenderingIdentifier;

return (
<div className={`component image ${props.params.styles}`} id={id ? id : undefined}>
Expand Down