fix: modify the color of the username in the preview

This commit is contained in:
codytseng
2025-02-24 22:57:38 +08:00
parent dbe7db7160
commit 3cb24e1f5f
3 changed files with 47 additions and 5 deletions

View File

@@ -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