Skip to content

Commit

Permalink
fix: Aligned delegate names in smaller screens
Browse files Browse the repository at this point in the history
  • Loading branch information
hernandoagf committed Jul 19, 2023
1 parent e33098a commit d90a306
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions modules/address/components/AddressIconBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,15 @@ export default function AddressIconBox({
<Flex sx={{ flexDirection: ['column', 'row'] }}>
<Flex sx={{ alignItems: 'center' }}>
{delegate ? (
<Text>
{limitTextLength ? limitString(delegate.name, limitTextLength, '...') : delegate.name}
</Text>
limitTextLength ? (
<Flex sx={{ flexDirection: 'column' }}>
{delegate.name.split(' - ').map((name, i) => (
<Text key={delegate.name + '-' + i}>{limitString(name, limitTextLength, '...')}</Text>
))}
</Flex>
) : (
<Text>{delegate.name}</Text>
)
) : (
<Text>
<Address address={address} maxLength={limitTextLength} />
Expand Down

0 comments on commit d90a306

Please sign in to comment.