({
name,
username,
createdAt,
reputation,
className,
company,
isPlus,
}: UserMetadataProps)
| 26 | }; |
| 27 | |
| 28 | export function UserMetadata({ |
| 29 | name, |
| 30 | username, |
| 31 | createdAt, |
| 32 | reputation, |
| 33 | className, |
| 34 | company, |
| 35 | isPlus, |
| 36 | }: UserMetadataProps): ReactElement { |
| 37 | return ( |
| 38 | <div |
| 39 | className={classNames( |
| 40 | 'flex flex-col text-text-quaternary typo-caption2', |
| 41 | className, |
| 42 | )} |
| 43 | > |
| 44 | <div className="flex items-center"> |
| 45 | <h2 |
| 46 | className={classNames( |
| 47 | truncateTextClassNames, |
| 48 | 'font-bold text-text-primary typo-title3', |
| 49 | )} |
| 50 | > |
| 51 | {name} |
| 52 | </h2> |
| 53 | {reputation && ( |
| 54 | <ReputationUserBadge |
| 55 | className="ml-0.5 !typo-footnote" |
| 56 | user={{ reputation }} |
| 57 | iconProps={{ size: IconSize.XSmall }} |
| 58 | disableTooltip |
| 59 | /> |
| 60 | )} |
| 61 | </div> |
| 62 | <div className="flex items-center"> |
| 63 | <TruncateText |
| 64 | className="text-text-secondary typo-footnote" |
| 65 | translate="no" |
| 66 | > |
| 67 | @{username} |
| 68 | </TruncateText> |
| 69 | <Separator /> |
| 70 | <JoinedDate |
| 71 | className="text-text-quaternary typo-caption2" |
| 72 | date={new Date(createdAt)} |
| 73 | /> |
| 74 | </div> |
| 75 | {isPlus && <PlusUser />} |
| 76 | {!!company && ( |
| 77 | <div className="flex items-center gap-1"> |
| 78 | <ProfilePicture |
| 79 | className="border border-border-subtlest-secondary" |
| 80 | size={ProfileImageSize.Size16} |
| 81 | user={{ |
| 82 | image: company.image, |
| 83 | id: company.name, |
| 84 | }} |
| 85 | /> |
nothing calls this directly
no outgoing calls
no test coverage detected