From b38000c343a6d1bfc1567b4f337c1e3f01b31abd Mon Sep 17 00:00:00 2001 From: Siarhei Karol Date: Wed, 25 Dec 2024 15:47:26 +0300 Subject: [PATCH] Edit headers in full entity display screens --- src/common/constants/uiControls.constants.ts | 1 + src/components/FullDisplay/PreviewContent.tsx | 2 -- src/components/Preview/Fields.tsx | 3 ++- src/components/Preview/Labels.tsx | 1 - src/components/Preview/Preview.scss | 25 ++----------------- .../__tests__/components/FullDisplay.test.tsx | 3 +-- 6 files changed, 6 insertions(+), 29 deletions(-) diff --git a/src/common/constants/uiControls.constants.ts b/src/common/constants/uiControls.constants.ts index 43fbd639..cc887555 100644 --- a/src/common/constants/uiControls.constants.ts +++ b/src/common/constants/uiControls.constants.ts @@ -34,6 +34,7 @@ export const UI_DROPDOWNS_LIST = [AdvancedFieldType.dropdown, AdvancedFieldType. export const NOT_PREVIEWABLE_TYPES = [ AdvancedFieldType.profile, + AdvancedFieldType.block, AdvancedFieldType.hidden, AdvancedFieldType.dropdownOption, AdvancedFieldType.complex, diff --git a/src/components/FullDisplay/PreviewContent.tsx b/src/components/FullDisplay/PreviewContent.tsx index b3cad58d..0c36fa57 100644 --- a/src/components/FullDisplay/PreviewContent.tsx +++ b/src/components/FullDisplay/PreviewContent.tsx @@ -15,7 +15,6 @@ export const PreviewContent = () => { return previewContent.map(({ id, base, userValues, initKey, title, entities }) => { const resourceType = entities?.map(e => RESOURCE_TEMPLATE_IDS[e])?.[0]; - const resourceTypeWithFallback = resourceType ?? '-'; const handleButtonClick = () => setPreviewContent(previewContent.filter(entry => entry.id !== id)); return ( @@ -31,7 +30,6 @@ export const PreviewContent = () => {
{title} - {resourceTypeWithFallback}