clean up & polish

This commit is contained in:
Ren Amamiya
2023-08-30 09:03:02 +07:00
parent 91e50efb1a
commit abe4d11498
24 changed files with 93 additions and 268 deletions

View File

@@ -36,6 +36,7 @@ export function TextNote({ event }: { event: NDKEvent }) {
}}
disallowedElements={['h1', 'h2', 'h3', 'h4', 'h5', 'h6']}
unwrapDisallowed={true}
linkTarget={'_blank'}
>
{content?.parsed}
</ReactMarkdown>

View File

@@ -84,7 +84,7 @@ export function NoteMetadata({ id }: { id: string }) {
<div className="absolute left-[18px] top-14 h-[calc(100%-6.4rem)] w-0.5 bg-gradient-to-t from-white/20 to-white/10" />
<div className="relative z-10 flex items-center gap-3 pb-3">
<div className="mt-2 inline-flex h-6 w-11 shrink-0 items-center justify-center">
<div className="isolate flex -space-x-1 overflow-hidden">
<div className="isolate flex -space-x-1">
{data.users?.map((user, index) => (
<MiniUser key={user + index} pubkey={user} />
))}

View File

@@ -6,14 +6,14 @@ export function MiniUser({ pubkey }: { pubkey: string }) {
const { status, user } = useProfile(pubkey);
if (status === 'loading') {
return <div className="h-4 w-4 animate-pulse rounded bg-zinc-700"></div>;
return <div className="h-4 w-4 animate-pulse rounded bg-white/10"></div>;
}
return (
<Image
src={user?.picture || user?.image}
alt={pubkey}
className="relative z-20 inline-block h-4 w-4 rounded bg-white ring-1 ring-zinc-800"
className="relative z-20 inline-block h-4 w-4 rounded ring-1 ring-black"
/>
);
}

View File

@@ -7,7 +7,7 @@ export function RepostUser({ pubkey }: { pubkey: string }) {
const { status, user } = useProfile(pubkey);
if (status === 'loading') {
return <div className="h-4 w-4 animate-pulse rounded bg-zinc-700"></div>;
return <div className="h-4 w-4 animate-pulse rounded bg-white/10"></div>;
}
return (

View File

@@ -9,7 +9,7 @@ export function ThreadUser({ pubkey, time }: { pubkey: string; time: number }) {
const createdAt = formatCreatedAt(time);
if (status === 'loading') {
return <div className="h-4 w-4 animate-pulse rounded bg-zinc-700"></div>;
return <div className="h-4 w-4 animate-pulse rounded bg-white/10"></div>;
}
return (