Skip to content

Commit

Permalink
Add copy id button for admins
Browse files Browse the repository at this point in the history
  • Loading branch information
IanPhilips committed Sep 16, 2024
1 parent 38301ca commit f14ea3d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions web/components/user/user-hovercard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { Col } from '../layout/col'
import { FullUser } from 'common/api/user-types'
import { useIsClient } from 'web/hooks/use-is-client'
import { TRADE_TERM } from 'common/envs/constants'
import { SimpleCopyTextButton } from 'web/components/buttons/copy-link-button'

export type UserHovercardProps = {
children: React.ReactNode
Expand Down Expand Up @@ -104,6 +105,14 @@ const FetchUserHovercardContent = forwardRef(
<div className="text-ink-400">
Joined {dayjs(user.createdTime).format('MMM DD, YYYY')}
</div>
{isMod && (
<SimpleCopyTextButton
text={user.id}
tooltip="Copy user id"
className="!px-1 !py-px"
eventTrackingName={'admin copy user id'}
/>
)}
</Row>
</Col>
</div>
Expand Down

0 comments on commit f14ea3d

Please sign in to comment.