mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-26 07:44:05 +00:00
Major additions: - Complete Next.js studio application with 1600+ components - Docker support (Dockerfile.combined, docker-compose.yml) - GCP deployment documentation and benchmarks - SQL benchmark scripts for performance testing - Sentry integration for monitoring - Comprehensive test suite and mocks Studio features: - Dashboard and admin interfaces - Data visualization components - Authentication and user management - API integration with RuVector backend - Static data and public assets 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
62 lines
1.7 KiB
TypeScript
62 lines
1.7 KiB
TypeScript
import { Copy } from 'lucide-react'
|
|
|
|
import CopyButton from 'components/ui/CopyButton'
|
|
import { User } from 'data/auth/users-infinite-query'
|
|
import { cn } from 'ui'
|
|
import { PANEL_PADDING } from './Users.constants'
|
|
import { getDisplayName } from './Users.utils'
|
|
|
|
export const UserHeader = ({ user }: { user: User }) => {
|
|
const displayName = getDisplayName(user)
|
|
const hasDisplayName = displayName !== '-'
|
|
|
|
const isPhoneAuth = user.phone !== null
|
|
const isAnonUser = user.is_anonymous
|
|
|
|
return (
|
|
<div className={cn(PANEL_PADDING)}>
|
|
{isPhoneAuth ? (
|
|
<div className="flex items-center gap-x-1">
|
|
<p>{user.phone}</p>
|
|
<CopyButton
|
|
iconOnly
|
|
type="text"
|
|
icon={<Copy />}
|
|
className="px-1"
|
|
text={user?.phone ?? ''}
|
|
/>
|
|
</div>
|
|
) : isAnonUser ? (
|
|
<>
|
|
<p>Anonymous user</p>
|
|
<div className="flex items-center gap-x-1">
|
|
<p className="text-foreground-light text-sm">{user.id}</p>
|
|
<CopyButton
|
|
iconOnly
|
|
type="text"
|
|
icon={<Copy />}
|
|
className="px-1"
|
|
text={user?.id ?? ''}
|
|
/>
|
|
</div>
|
|
</>
|
|
) : (
|
|
<>
|
|
{hasDisplayName && <p>{displayName}</p>}
|
|
<div className="flex items-center gap-x-1">
|
|
<p className={cn(hasDisplayName ? 'text-foreground-light text-sm' : 'text-foreground')}>
|
|
{user.email}
|
|
</p>
|
|
<CopyButton
|
|
iconOnly
|
|
type="text"
|
|
icon={<Copy />}
|
|
className="px-1"
|
|
text={user?.email ?? ''}
|
|
/>
|
|
</div>
|
|
</>
|
|
)}
|
|
</div>
|
|
)
|
|
}
|