Skip to content

Commit cca004e

Browse files
committed
fix: display item link if the title is missing
1 parent 7173248 commit cca004e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

frontend/src/lib/components/ItemList.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@
4848
<li class="group rounded-md">
4949
<a
5050
href={'/items/' + item.id}
51-
class="hover:bg-base-300 relative flex w-full flex-col items-center justify-between space-x-2 space-y-1 rounded-md px-2 py-2 transition-colors md:flex-row"
51+
class="hover:bg-base-300 relative flex w-full flex-col items-center justify-between space-y-1 space-x-2 rounded-md px-2 py-2 transition-colors md:flex-row"
5252
>
5353
<div class="flex w-full md:w-[80%] md:shrink-0">
5454
<h2
5555
class={`line-clamp-2 w-full truncate font-medium md:line-clamp-1 ${highlightUnread && !item.unread ? 'text-base-content/60' : ''}`}
5656
>
57-
{item.title}
57+
{item.title || item.link}
5858
</h2>
5959
</div>
6060
<div class="flex w-full md:grow">

frontend/src/routes/(authed)/items/[id]/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
class="inline-flex items-center gap-2 no-underline hover:underline"
109109
>
110110
<span>
111-
{data.title}
111+
{data.title || data.link}
112112
</span>
113113
<ExternalLink class="hidden size-5 md:block" />
114114
</a>

0 commit comments

Comments
 (0)