fix: ssr crash

This commit is contained in:
James Xylight committed 2025-03-02 15:30:00 -08:00
1 parent 5e18fbb0bd
commit c4c28aa76b
5 files changed
+12 -12

No files matched your search

@@ -3,6 +3,7 @@
import type { CommentView, PostView } from 'lemmy-js-client'
import { amMod, ban, isAdmin, remove } from './moderation'
import {
ArrowsUpDown,
Fire,
Icon,
LockClosed,
@@ -42,8 +42,8 @@
color="distinct"
class="flex flex-col-reverse sm:flex-row
overflow-hidden gap-4 embed-card z-0 relative
dark:border-t-zinc-800 border-opacity-80 max-w-full shadow-sm shadow-black/5
dark:bg-zinc-950 group-hover/link:bg-slate-100 group-hover/link:dark:bg-zinc-900 transition-colors"
dark:border-t-zinc-800 border-opacity-80 max-w-full
dark:bg-zinc-950 group-hover/link:bg-slate-50 group-hover/link:dark:bg-zinc-900 transition-colors"
rounding="2xl"
element="article"
>
@@ -57,13 +57,11 @@
{/if}
<div class="flex flex-col gap-2">
{#if richURL}
<Link
href={url}
target="_blank"
<div
class="text-slate-600 dark:text-zinc-400 inline-flex items-center gap-1 text-xs font-medium"
>
{richURL.hostname}
</Link>
</div>
{/if}
<p class="font-medium text-base">{embed_title}</p>
</div>
@@ -18,7 +18,7 @@
let { items, isFavorites = false }: Props = $props()
</script>
{#each items.sort( (a, b) => a.title.localeCompare(b.title), ) as follow (follow.id)}
{#each items.toSorted( (a, b) => a.title.localeCompare(b.title), ) as follow (follow.id)}
<div
class="inline-flex w-full items-center pl-3 hover:bg-slate-100 hover:dark:bg-zinc-900
transition-colors rounded-lg"