diff --git a/packages/common/src/ui/lib/add-ellipsis.ts b/packages/common/src/ui/lib/add-ellipsis.ts index 8938ff784..887a86ecb 100644 --- a/packages/common/src/ui/lib/add-ellipsis.ts +++ b/packages/common/src/ui/lib/add-ellipsis.ts @@ -8,11 +8,11 @@ export const truncate = (text: string, partOneLength: number, partTwoLength: num return `${text.slice(0, partOneLength)}${text.slice(text.length - partTwoLength)}`; }; -export const addEllipsis = (text: string, partOnelength: number, partTwoLength: number): string => { - const textMinLenght = partOnelength + partTwoLength + addedLength; - if (text.length <= textMinLenght) return text; +export const addEllipsis = (text: string, partOneLength: number, partTwoLength: number): string => { + const textMinLength = partOneLength + partTwoLength + addedLength; + if (text.length <= textMinLength) return text; - return `${text.slice(0, partOnelength)}...${text.slice(text.length - partTwoLength)}`; + return `${text.slice(0, partOneLength)}...${text.slice(text.length - partTwoLength)}`; }; const getCssStyle = (element: HTMLElement, prop: string) => window.getComputedStyle(element).getPropertyValue(prop); diff --git a/packages/core/src/ui/components/Nft/NftDetail.tsx b/packages/core/src/ui/components/Nft/NftDetail.tsx index 3f6498c2c..1b8957a56 100644 --- a/packages/core/src/ui/components/Nft/NftDetail.tsx +++ b/packages/core/src/ui/components/Nft/NftDetail.tsx @@ -1,4 +1,4 @@ -import { InlineInfoList, LabeledInfo } from '@lace/common'; +import { Ellipsis, InlineInfoList, LabeledInfo } from '@lace/common'; import React, { ReactNode } from 'react'; import styles from './NftDetail.module.scss'; import { NftImage } from './NftImage'; @@ -74,13 +74,17 @@ export const NftDetail = ({ Root - {folder && {folder}} + {folder && ( + + + + )} ) : ( Root {folder && {'>'}} - {folder && {folder}} + {folder && } ) }