Skip to content

Commit

Permalink
chore: truncate and fallback account usernames
Browse files Browse the repository at this point in the history
  • Loading branch information
dominik-stumpf committed Aug 23, 2024
1 parent 887722b commit a0cb869
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/v2/components/Account/Account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const Account = () => {
</Avatar>
<div className="flex flex-col items-start">
<div className="max-w-24 truncate font-bold text-sm leading-tight">
{guildProfile.name}
{guildProfile.name || guildProfile.username}
</div>
<div className="text-muted-foreground text-xs">
@{guildProfile.username}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ const AccountModal = () => {
})

deleteKeyPairFromIdb(id)
?.catch(() => {})
?.catch(() => {})
?.catch(() => {})
?.catch(() => {})
?.catch(() => {})
?.catch(() => {})
.finally(() => {
setIsOpen(false)
Expand Down Expand Up @@ -96,8 +101,10 @@ const AccountModal = () => {
</Avatar>
<div className="flex w-full flex-col">
<h3 className=" flex items-center font-bold">
{guildProfile.name}
<CheckMark className="-mt-0.5 ml-1 inline-block fill-yellow-500" />
<span className="max-w-52 truncate">
{guildProfile.name || guildProfile.username}
</span>
<CheckMark className="ml-0.5 inline-block fill-yellow-500" />
</h3>
<div className="text-muted-foreground text-sm">
@{guildProfile.username}
Expand Down

0 comments on commit a0cb869

Please sign in to comment.