use custom skeleton for note

This commit is contained in:
Ren Amamiya
2023-05-08 09:32:01 +07:00
parent 348dc9009c
commit 5d9b440dc8
10 changed files with 41 additions and 27 deletions

View File

@@ -4,7 +4,6 @@ import { useProfile } from '@lume/utils/hooks/useProfile';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
import Skeleton from 'react-loading-skeleton';
dayjs.extend(relativeTime);
@@ -22,7 +21,7 @@ export const NoteRepostUser = ({ pubkey, time }: { pubkey: string; time: number
</div>
<div className="flex items-baseline gap-1.5 text-sm">
<h5 className="font-semibold leading-tight group-hover:underline">
{user?.display_name || user?.name || <Skeleton />}
{user?.display_name || user?.name || <div className="h-3 w-20 animate-pulse rounded-sm bg-zinc-700"></div>}
<span className="bg-gradient-to-r from-fuchsia-300 via-orange-100 to-amber-300 bg-clip-text text-transparent">
{' '}
reposted