From 5d696d0d0a6931699be24a0ced8a7eeb98973fd8 Mon Sep 17 00:00:00 2001 From: Simon Backx Date: Wed, 13 Sep 2023 16:23:52 +0200 Subject: [PATCH] Updated recommendation creation to use excerpt by default (#18118) fixes https://github.com/TryGhost/Product/issues/3869 --- .../settings/site/recommendations/AddRecommendationModal.tsx | 1 + .../settings/site/recommendations/RecommendationReasonForm.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/admin-x-settings/src/components/settings/site/recommendations/AddRecommendationModal.tsx b/apps/admin-x-settings/src/components/settings/site/recommendations/AddRecommendationModal.tsx index 3ea1c84d29..6673ea248a 100644 --- a/apps/admin-x-settings/src/components/settings/site/recommendations/AddRecommendationModal.tsx +++ b/apps/admin-x-settings/src/components/settings/site/recommendations/AddRecommendationModal.tsx @@ -78,6 +78,7 @@ const AddRecommendationModal: React.FC = ({recommen updatedRecommendation.favicon = oembed?.metadata?.icon ?? formState.favicon ?? null; updatedRecommendation.one_click_subscribe = false; } + updatedRecommendation.reason = updatedRecommendation.excerpt || null; // Switch modal without changing the route (the second modal is not reachable by URL) modal.remove(); diff --git a/apps/admin-x-settings/src/components/settings/site/recommendations/RecommendationReasonForm.tsx b/apps/admin-x-settings/src/components/settings/site/recommendations/RecommendationReasonForm.tsx index 533fa33e3c..e237ce1108 100644 --- a/apps/admin-x-settings/src/components/settings/site/recommendations/RecommendationReasonForm.tsx +++ b/apps/admin-x-settings/src/components/settings/site/recommendations/RecommendationReasonForm.tsx @@ -39,7 +39,7 @@ const RecommendationReasonForm: React.FC updateForm(state => ({...state, reason: e.target.value}))} />