mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
Changed copy for removing recommendations
refs https://github.com/TryGhost/Product/issues/3899
This commit is contained in:
parent
1bfedcfd00
commit
88c9ee8a34
@ -48,29 +48,29 @@ const EditRecommendationModalConfirm: React.FC<AddRecommendationModalProps> = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
let leftButtonProps = {
|
let leftButtonProps = {
|
||||||
label: 'Remove recommendation',
|
label: 'Delete',
|
||||||
link: true,
|
link: true,
|
||||||
color: 'red' as const,
|
color: 'red' as const,
|
||||||
size: 'sm' as const,
|
size: 'sm' as const,
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
modal.remove();
|
modal.remove();
|
||||||
NiceModal.show(ConfirmationModal, {
|
NiceModal.show(ConfirmationModal, {
|
||||||
title: 'Remove recommendation',
|
title: 'Delete recommendation',
|
||||||
prompt: <>
|
prompt: <>
|
||||||
<p>Your recommendation <strong>{recommendation.title}</strong> will no longer be visible to your audience.</p>
|
<p>Your recommendation <strong>{recommendation.title}</strong> will no longer be visible to your audience.</p>
|
||||||
</>,
|
</>,
|
||||||
okLabel: 'Remove',
|
okLabel: 'Delete',
|
||||||
onOk: async (deleteModal) => {
|
onOk: async (deleteModal) => {
|
||||||
try {
|
try {
|
||||||
await deleteRecommendation(recommendation);
|
await deleteRecommendation(recommendation);
|
||||||
deleteModal?.remove();
|
deleteModal?.remove();
|
||||||
showToast({
|
showToast({
|
||||||
message: 'Successfully removed the recommendation',
|
message: 'Successfully deleted the recommendation',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
});
|
});
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
showToast({
|
showToast({
|
||||||
message: 'Failed to remove the recommendation. Please try again later.',
|
message: 'Failed to delete the recommendation. Please try again later.',
|
||||||
type: 'error'
|
type: 'error'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user