refactor: add note about refactoring to remove JS truncation

This commit is contained in:
Pete Watters
2023-06-28 14:34:39 +01:00
parent 5632c1cd95
commit a798bd1a40

View File

@@ -26,10 +26,10 @@ const AccountNameSuspense = memo((props: BoxProps) => {
const currentAccount = useCurrentStacksAccount();
const name = useCurrentAccountDisplayName();
if (!currentAccount || typeof currentAccount.index === 'undefined') return null;
// FIXME: The name is truncated here with JS but we could just use CSS to do this
const nameCharLimit = 18;
const isLong = name.length > nameCharLimit;
const displayName = truncateString(name, nameCharLimit);
return (
<AccountNameTitle {...props}>
<Tooltip label={isLong ? name : undefined}>