fix: clicking thumbnails sends you to main page in list
This commit is contained in:
1 parent
b79496a1c9
commit
103b421b8c
1 file changed
+3
-3
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
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 { isImage } from '$lib/ui/image'
|
||||
import type { Post } from 'lemmy-js-client'
|
||||
@@ -21,14 +21,14 @@
|
||||
/>
|
||||
</a>
|
||||
{:else}
|
||||
<ExpandableImage url={bestImageURL(post, false, 2048)}>
|
||||
<button on:click={() => showImage(bestImageURL(post, false, 2048))}>
|
||||
<!-- svelte-ignore a11y-missing-attribute -->
|
||||
<img
|
||||
src={bestImageURL(post, true)}
|
||||
loading="lazy"
|
||||
class="object-cover bg-slate-100 rounded-md h-24 w-24 border border-slate-200 dark:border-zinc-700"
|
||||
/>
|
||||
</ExpandableImage>
|
||||
</button>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
Reference in new issue
Block a user