From f77a660b74fda57776edc41fb552aa66002dee3e Mon Sep 17 00:00:00 2001 From: nada-deriv <122768621+nada-deriv@users.noreply.github.com> Date: Tue, 14 May 2024 08:33:25 +0400 Subject: [PATCH] fix: error message fix for ad creation with same limit/same rate (#65) --- .../AdCreateEditErrorModal/AdCreateEditErrorModal.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/components/Modals/AdCreateEditErrorModal/AdCreateEditErrorModal.tsx b/src/components/Modals/AdCreateEditErrorModal/AdCreateEditErrorModal.tsx index 52552c6a..237aeab6 100644 --- a/src/components/Modals/AdCreateEditErrorModal/AdCreateEditErrorModal.tsx +++ b/src/components/Modals/AdCreateEditErrorModal/AdCreateEditErrorModal.tsx @@ -12,20 +12,15 @@ type TAdCreateEditErrorModalProps = { type ErrorContent = { [key in TErrorCodes]?: { - description: string; title: string; }; }; const errorContent: ErrorContent = { [ERROR_CODES.ADVERT_SAME_LIMITS]: { - description: - 'Please set a different minimum and/or maximum order limit. \n\nThe range of your ad should not overlap with any of your active ads.', title: 'You already have an ad with this range', }, [ERROR_CODES.DUPLICATE_ADVERT]: { - description: - 'You already have an ad with the same exchange rate for this currency pair and order type. \n\nPlease set a different rate for your ad.', title: 'You already have an ad with this rate', }, }; @@ -49,7 +44,7 @@ const AdCreateEditErrorModal = ({ {(errorCode && errorContent?.[errorCode]?.title) ?? 'Something’s not right'} - {(errorCode && errorContent?.[errorCode]?.description) ?? errorMessage} + {errorMessage}