Skip to content

Commit

Permalink
fix: xxs attack on listname, have a loading state
Browse files Browse the repository at this point in the history
  • Loading branch information
evvvritt committed Oct 4, 2023
1 parent 6c8a016 commit a90028a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/lib/components/drip-list-badge/drip-list-badge.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import formatAddress from '$lib/utils/format-address';
export let listId: string;
export let listName: string | undefined = undefined;
export let listName: string | '##loading##' | undefined = undefined;
export let owner: string | undefined = undefined;
export let isLinked = true;
Expand Down Expand Up @@ -41,7 +41,8 @@
<div class="name typo-text text-foreground flex-1 min-w-0 truncate">
<span
>{#if username}<span class="text-foreground-level-5">{username}/</span
>{/if}{@html listName}</span
>{/if}{#if listName === '##loading##'}<span class="animate-pulse">...</span
>{:else}{listName}{/if}</span
>
</div>
{/if}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/table/cells/user-badge.cell.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
{:else}
<!-- TODO: Donʼt presume any NFT account is a Drip List. -->
<DripListBadge
listName={dripList ? dripList.name : '<span class="animate-pulse">...</span>'}
listName={dripList ? dripList.name : '##loading##'}
listId={user.accountId}
avatarSize="small"
isLinked={false}
Expand Down

0 comments on commit a90028a

Please sign in to comment.