mirror of
https://github.com/zhigang1992/wallet.git
synced 2026-01-12 22:53:27 +08:00
refactor: add note about refactoring to remove JS truncation
This commit is contained in:
@@ -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}>
|
||||
|
||||
Reference in New Issue
Block a user