import React from 'react'; import { Tooltip } from './Tooltip'; interface UsernameProps { username: string; className?: string; style?: React.CSSProperties; } export function Username({ username, className, style }: UsernameProps) { const atIndex = username.indexOf('@'); if (atIndex === -1) { return {username}; } const name = username.slice(0, atIndex); const domain = username.slice(atIndex + 1); return ( {name} @{domain} ); }