fix: 🐛
This commit is contained in:
@@ -2,7 +2,14 @@ import Username from '../Username'
|
||||
import { TEmbeddedRenderer } from './types'
|
||||
|
||||
export function EmbeddedMention({ userId }: { userId: string }) {
|
||||
return <Username userId={userId} showAt className="text-highlight font-normal inline-block" />
|
||||
return (
|
||||
<Username
|
||||
userId={userId}
|
||||
showAt
|
||||
className="text-highlight font-normal inline-block"
|
||||
withoutSkeleton
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
export const embeddedNostrNpubRenderer: TEmbeddedRenderer = {
|
||||
|
||||
@@ -10,15 +10,20 @@ export default function Username({
|
||||
userId,
|
||||
showAt = false,
|
||||
className,
|
||||
skeletonClassName
|
||||
skeletonClassName,
|
||||
withoutSkeleton = false
|
||||
}: {
|
||||
userId: string
|
||||
showAt?: boolean
|
||||
className?: string
|
||||
skeletonClassName?: string
|
||||
withoutSkeleton?: boolean
|
||||
}) {
|
||||
const { profile } = useFetchProfile(userId)
|
||||
if (!profile) return <Skeleton className={cn('w-16 my-1', skeletonClassName)} />
|
||||
if (!profile && !withoutSkeleton) {
|
||||
return <Skeleton className={cn('w-16 my-1', skeletonClassName)} />
|
||||
}
|
||||
if (!profile) return null
|
||||
|
||||
const { username, pubkey } = profile
|
||||
|
||||
|
||||
Reference in New Issue
Block a user