From e19d8bbed771e6d1d63b8a7954feb4d07b517eaa Mon Sep 17 00:00:00 2001 From: Keerat Kohli Date: Thu, 26 Sep 2024 19:49:52 -0400 Subject: [PATCH] Fixes #7220: Remove primary banner icon when only one value present --- .../meta-types/input/components/EmailsFieldInput.tsx | 4 +++- .../meta-types/input/components/LinksFieldInput.tsx | 4 +++- .../meta-types/input/components/PhonesFieldInput.tsx | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/EmailsFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/EmailsFieldInput.tsx index 02ce963192b0..32418cebc607 100644 --- a/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/EmailsFieldInput.tsx +++ b/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/EmailsFieldInput.tsx @@ -29,6 +29,8 @@ export const EmailsFieldInput = ({ onCancel }: EmailsFieldInputProps) => { }); }; + const isPrimaryEmail = (index: number) => index === 0 && emails?.length > 1; + return ( { { }); }; + const isPrimaryLink = (index: number) => index === 0 && links?.length > 1; + return ( { { }); }; + const isPrimaryPhone = (index: number) => index === 0 && phones?.length > 1; + return ( {