chore: changes for `1.1.4`

This commit is contained in:
Andrei O 2023-11-08 23:54:11 +02:00
parent b29265afe9
commit 68bbb0d095
No known key found for this signature in database
GPG Key ID: B961E5B68389457E
2 changed files with 4 additions and 4 deletions

View File

@ -16,7 +16,7 @@
</script>
{#if notif.eventType === "vote"}
{@const url = notif.meta.url}
{@const url = notif?.meta?.url ?? ''}
{@const length = url.length}
{@const shortUrl = url.slice(0, 10) + "..." + url.slice(length - 10, length)}
{@const finalUrl = length > 24 ? shortUrl : url}
@ -27,11 +27,11 @@
by
{#if notif?.senders?.length > 1}
{notif?.senders[0].handle}
{#if notif.senders.length - 1 > 0}
{#if notif.senders?.length - 1 > 0}
<span class="opacity-60"> and {notif.senders.length - 1} more</span>
{/if}
{:else}
{notif.senders[0].handle.length > 12 ? notif.senders[0].handle.slice(0, 12) + "..." : notif.senders[0].handle}
{notif.senders[0].handle?.length > 12 ? notif.senders[0]?.handle?.slice(0, 12) + "..." : notif.senders[0]?.handle ?? ''}
{/if}
</p>
<p class="text-xs text-gray-200 my-0 mt-1">

View File

@ -51,7 +51,7 @@ const changeNotifsType = async (t : string[] | null) => {
{#if loading}
<PageLoader />
{:else if notifs.length === 0}
{:else if (notifs ?? []).length === 0}
{#await pastNotifsPromise}
&nbsp;