import { HoverCard, HoverCardContent, HoverCardTrigger } from '@/components/ui/hover-card' import { Skeleton } from '@/components/ui/skeleton' import { useFetchProfile } from '@/hooks' import { toProfile } from '@/lib/link' import { cn } from '@/lib/utils' import { SecondaryPageLink } from '@/PageManager' import ProfileCard from '../ProfileCard' export default function Username({ userId, showAt = false, className, skeletonClassName }: { userId: string showAt?: boolean className?: string skeletonClassName?: string }) { const { profile } = useFetchProfile(userId) if (!profile) return const { username, pubkey } = profile return (
e.stopPropagation()} > {showAt && '@'} {username}
) } export function SimpleUsername({ userId, showAt = false, className, skeletonClassName }: { userId: string showAt?: boolean className?: string skeletonClassName?: string }) { const { profile } = useFetchProfile(userId) if (!profile) return const { username } = profile return (
{showAt && '@'} {username}
) }