fix: clicking thumbnails sends you to main page in list

This commit is contained in:
Xylight committed 2024-03-09 11:01:55 -08:00
1 parent b79496a1c9
commit 103b421b8c
1 file changed
+3 -3
@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { bestImageURL, postLink } from '$lib/components/lemmy/post/helpers.js' import { bestImageURL, postLink } from '$lib/components/lemmy/post/helpers.js'
import ExpandableImage from '$lib/components/ui/ExpandableImage.svelte' import { showImage } from '$lib/components/ui/ExpandableImage.svelte'
import { userSettings } from '$lib/settings.js' import { userSettings } from '$lib/settings.js'
import { isImage } from '$lib/ui/image' import { isImage } from '$lib/ui/image'
import type { Post } from 'lemmy-js-client' import type { Post } from 'lemmy-js-client'
@@ -21,14 +21,14 @@
/> />
</a> </a>
{:else} {:else}
<ExpandableImage url={bestImageURL(post, false, 2048)}> <button on:click={() => showImage(bestImageURL(post, false, 2048))}>
<!-- svelte-ignore a11y-missing-attribute --> <!-- svelte-ignore a11y-missing-attribute -->
<img <img
src={bestImageURL(post, true)} src={bestImageURL(post, true)}
loading="lazy" loading="lazy"
class="object-cover bg-slate-100 rounded-md h-24 w-24 border border-slate-200 dark:border-zinc-700" class="object-cover bg-slate-100 rounded-md h-24 w-24 border border-slate-200 dark:border-zinc-700"
/> />
</ExpandableImage> </button>
{/if} {/if}
</div> </div>
{/if} {/if}