From 0cf279b67cec829b0898308db79417aa77974de6 Mon Sep 17 00:00:00 2001 From: blakeganderson <85515364+blakeganderson@users.noreply.github.com> Date: Fri, 1 Nov 2024 16:18:42 -0400 Subject: [PATCH] updated small promo to make the headline editable (#2248) --- .prettierrc | 4 ++-- blocks/small-promo-block/features/small-promo/default.jsx | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.prettierrc b/.prettierrc index f7b00e972..9d6346b28 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,5 +1,5 @@ { "useTabs": true, "printWidth": 100, - experimentalTernaries: false, -} + "experimentalTernaries": false +} \ No newline at end of file diff --git a/blocks/small-promo-block/features/small-promo/default.jsx b/blocks/small-promo-block/features/small-promo/default.jsx index 7bc6e985d..bced08732 100644 --- a/blocks/small-promo-block/features/small-promo/default.jsx +++ b/blocks/small-promo-block/features/small-promo/default.jsx @@ -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 = @@ -171,9 +171,12 @@ const SmallPromo = ({ customFields }) => { ) : null; + const editableItem = + content?.headlines ? editableContent(content, "headlines.basic") : {}; + const promoHeading = showHeadline && headline ? ( - +