Skip to content

Commit

Permalink
updated small promo to make the headline editable
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeganderson committed Oct 11, 2024
1 parent 4c73cf4 commit 063b410
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
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

0 comments on commit 063b410

Please sign in to comment.