From c4468d60f6d552df32ddfa57887b5248c0c3cdb3 Mon Sep 17 00:00:00 2001 From: 310387 <139059022+310387@users.noreply.github.com> Date: Sun, 23 Jul 2023 02:28:33 +0300 Subject: [PATCH] fix: 802 if no text dont show avatar (#831) * fix: 802 if no text dont show avatar * fix: 802 use guard for empty check and allow whitespace only case --- .../modules/ui/chip/components/EntityChip.tsx | 33 +++++++++++-------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/front/src/modules/ui/chip/components/EntityChip.tsx b/front/src/modules/ui/chip/components/EntityChip.tsx index f18f7bc0f..c2865c4f4 100644 --- a/front/src/modules/ui/chip/components/EntityChip.tsx +++ b/front/src/modules/ui/chip/components/EntityChip.tsx @@ -4,6 +4,7 @@ import { Theme } from '@emotion/react'; import styled from '@emotion/styled'; import { Avatar, AvatarType } from '@/users/components/Avatar'; +import { isNonEmptyString } from '~/utils/isNonEmptyString'; import { OverflowingTextWithTooltip } from '../../tooltip/OverflowingTextWithTooltip'; @@ -89,26 +90,30 @@ export function EntityChip({ onClick={handleLinkClick} variant={variant} > - + {isNonEmptyString(name) && ( + + )} ) : ( - + {isNonEmptyString(name) && ( + + )}