This commit is contained in:
RobertoSimonini1
2024-07-08 20:33:12 +02:00
parent 5ca0e9b0ba
commit 5d92ce2726
2 changed files with 9 additions and 7 deletions

View File

@@ -12,8 +12,10 @@ export const FullNameFieldDisplay = () => {
const isMobile = useIsMobile();
const truncateTheContent = (contentToTruncate: string, maxLength: number) => {
return contentToTruncate.length > maxLength ? `${contentToTruncate.slice(0, maxLength)}...` : contentToTruncate;
}
return contentToTruncate.length > maxLength
? `${contentToTruncate.slice(0, maxLength)}...`
: contentToTruncate;
};
const content = [fieldValue?.firstName, fieldValue?.lastName]
.filter(isNonEmptyString)

View File

@@ -6,7 +6,7 @@ const StyledEllipsisDisplay = styled.div<{ maxWidth?: number }>`
text-overflow: ellipsis;
white-space: nowrap;
width: 100%;
`;
`;
type EllipsisDisplayProps = {
children: React.ReactNode;