fix: swap order of isImage and thumbnail

This commit is contained in:
Xyphyn committed 2023-07-26 15:03:43 -07:00
1 parent 46a0007c60
commit 038a4363b0
1 file changed
+7 -7
+7 -7
View File
@@ -108,19 +108,19 @@
saved={postData.saved}
/>
<h1 class="font-bold text-lg">{post.name}</h1>
{#if post.url && !post.thumbnail_url}
{#if isImage(post.url)}
<img
src={post.url}
alt={post.name}
class="rounded-md max-w-screen max-h-[80vh] mx-auto"
/>
{:else if post.url && !post.thumbnail_url}
<a
href={post.url}
class="max-w-full overflow-hidden overflow-ellipsis whitespace-nowrap text-sky-400 hover:underline text-xs"
>
{post.url}
</a>
{:else if isImage(post.url)}
<img
src={post.url}
alt={post.name}
class="rounded-md max-w-screen max-h-[80vh] mx-auto"
/>
{:else if post.thumbnail_url && post.url}
<PostLink
thumbnail_url={post.thumbnail_url}