From a90028ac9a695022b81d40dab3fb1c92b7c13048 Mon Sep 17 00:00:00 2001 From: evvvritt Date: Wed, 4 Oct 2023 18:31:28 +0200 Subject: [PATCH] fix: xxs attack on listname, have a loading state --- src/lib/components/drip-list-badge/drip-list-badge.svelte | 5 +++-- src/lib/components/table/cells/user-badge.cell.svelte | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/components/drip-list-badge/drip-list-badge.svelte b/src/lib/components/drip-list-badge/drip-list-badge.svelte index 232a92156..f4ff63f26 100644 --- a/src/lib/components/drip-list-badge/drip-list-badge.svelte +++ b/src/lib/components/drip-list-badge/drip-list-badge.svelte @@ -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; @@ -41,7 +41,8 @@
{#if username}{username}/{/if}{@html listName}{/if}{#if listName === '##loading##'}...{:else}{listName}{/if}
{/if} diff --git a/src/lib/components/table/cells/user-badge.cell.svelte b/src/lib/components/table/cells/user-badge.cell.svelte index 17139175c..05e033ae6 100644 --- a/src/lib/components/table/cells/user-badge.cell.svelte +++ b/src/lib/components/table/cells/user-badge.cell.svelte @@ -46,7 +46,7 @@ {:else} ...'} + listName={dripList ? dripList.name : '##loading##'} listId={user.accountId} avatarSize="small" isLinked={false}