fix: 🐛
This commit is contained in:
parent
b15ce2c153
commit
0f2f82b3ac
3 changed files with 21 additions and 5 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue