mirror of
https://github.com/aljazceru/rabbit.git
synced 2025-12-17 22:14:26 +01:00
feat: use thumbnail of profile pic in post
This commit is contained in:
@@ -6,6 +6,7 @@ import useFormatDate from '@/hooks/useFormatDate';
|
|||||||
import { useTranslation } from '@/i18n/useTranslation';
|
import { useTranslation } from '@/i18n/useTranslation';
|
||||||
import useProfile from '@/nostr/useProfile';
|
import useProfile from '@/nostr/useProfile';
|
||||||
import npubEncodeFallback from '@/utils/npubEncodeFallback';
|
import npubEncodeFallback from '@/utils/npubEncodeFallback';
|
||||||
|
import { thumbnailUrl } from '@/utils/url';
|
||||||
|
|
||||||
export type PostProps = {
|
export type PostProps = {
|
||||||
authorPubkey: string;
|
authorPubkey: string;
|
||||||
@@ -44,7 +45,9 @@ const Post: Component<PostProps> = (props) => {
|
|||||||
<Show when={author()?.picture} keyed>
|
<Show when={author()?.picture} keyed>
|
||||||
{(url) => (
|
{(url) => (
|
||||||
<LazyLoad>
|
<LazyLoad>
|
||||||
{() => <img src={url} alt="icon" class="h-full w-full object-cover" />}
|
{() => (
|
||||||
|
<img src={thumbnailUrl(url)} alt="icon" class="h-full w-full object-cover" />
|
||||||
|
)}
|
||||||
</LazyLoad>
|
</LazyLoad>
|
||||||
)}
|
)}
|
||||||
</Show>
|
</Show>
|
||||||
|
|||||||
Reference in New Issue
Block a user