UserRow() — supabase Function Reference
Architecture documentation for the UserRow() function in UserImpersonationSelector.tsx from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD 51e34b0e_c81d_3dde_aa5f_10240c603a54["UserRow()"] d44a1c3b_079d_7fa6_71ab_78eb4daff73a["getAvatarUrl()"] 51e34b0e_c81d_3dde_aa5f_10240c603a54 -->|calls| d44a1c3b_079d_7fa6_71ab_78eb4daff73a 3c05a680_a8e3_7a53_e059_ae8513da59ad["getDisplayName()"] 51e34b0e_c81d_3dde_aa5f_10240c603a54 -->|calls| 3c05a680_a8e3_7a53_e059_ae8513da59ad style 51e34b0e_c81d_3dde_aa5f_10240c603a54 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/studio/components/interfaces/RoleImpersonationSelector/UserImpersonationSelector.tsx lines 526–565
const UserRow = ({ user, onClick, isImpersonating = false, isLoading = false }: UserRowProps) => {
const avatarUrl = getAvatarUrl(user)
const emailOrPhone = user.email || user.phone
const displayName = getDisplayName(user, '')
const isAnonymous = user.is_anonymous
const showDisplayName = displayName && displayName !== emailOrPhone
return (
<div className="flex items-center justify-between py-1 text-foreground">
<div className="flex items-center gap-4">
{avatarUrl ? (
<img className="rounded-full w-5 h-5" src={avatarUrl} alt={displayName || emailOrPhone} />
) : (
<div className="rounded-full w-[21px] h-[21px] bg-surface-300 border flex items-center justify-center text-foreground-lighter">
<IconUser size={12} strokeWidth={2} />
</div>
)}
<span className="text-sm flex items-center gap-4">
{emailOrPhone}
{showDisplayName && (
<>
<span className="text-foreground-lighter">
{displayName}
{isAnonymous ? ' (anonymous)' : ''}
</span>
</>
)}
<span className="text-foreground-light bg-surface-200 dark:bg-surface-400 rounded-md px-1 py-0.5 font-mono text-xs">
{user?.id?.slice(0, 8)}
</span>
</span>
</div>
<Button type="default" onClick={() => onClick(user)} disabled={isLoading} loading={isLoading}>
{isImpersonating ? 'Stop Impersonating' : 'Impersonate'}
</Button>
</div>
)
}
Domain
Subdomains
Source
Frequently Asked Questions
What does UserRow() do?
UserRow() is a function in the supabase codebase.
What does UserRow() call?
UserRow() calls 2 function(s): getAvatarUrl, getDisplayName.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free