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

updated small promo to make the headline editable #2248

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"useTabs": true,
"printWidth": 100,
experimentalTernaries: false,
}
"experimentalTernaries": false
}
7 changes: 5 additions & 2 deletions blocks/small-promo-block/features/small-promo/default.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const SmallPromo = ({ customFields }) => {
} = customFields;
const { registerSuccessEvent } = useComponentContext();
const { arcSite, isAdmin } = useFusionContext();
const { searchableField } = useEditableContent();
const { editableContent, searchableField } = useEditableContent();
const shouldLazyLoad = lazyLoad && !isAdmin;

const content =
Expand Down Expand Up @@ -171,9 +171,12 @@ const SmallPromo = ({ customFields }) => {
</Conditional>
) : null;

const editableItem =
content?.headlines ? editableContent(content, "headlines.basic") : {};

const promoHeading =
showHeadline && headline ? (
<Heading>
<Heading {...editableItem} suppressContentEditableWarning>
<Conditional
component={Link}
condition={linkURL}
Expand Down
Loading