fix: modify the color of the username in the preview
This commit is contained in:
parent
dbe7db7160
commit
3cb24e1f5f
3 changed files with 47 additions and 5 deletions
|
|
@ -56,21 +56,24 @@ export function SimpleUsername({
|
|||
userId,
|
||||
showAt = false,
|
||||
className,
|
||||
skeletonClassName
|
||||
skeletonClassName,
|
||||
withoutSkeleton = false
|
||||
}: {
|
||||
userId: string
|
||||
showAt?: boolean
|
||||
className?: string
|
||||
skeletonClassName?: string
|
||||
withoutSkeleton?: boolean
|
||||
}) {
|
||||
const { profile } = useFetchProfile(userId)
|
||||
if (!profile) {
|
||||
if (!profile && !withoutSkeleton) {
|
||||
return (
|
||||
<div className="py-1">
|
||||
<Skeleton className={cn('w-16', skeletonClassName)} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
if (!profile) return null
|
||||
|
||||
const { username } = profile
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue