mirror of
https://github.com/Steffo99/festa.git
synced 2024-12-22 22:54:22 +00:00
28 lines
No EOL
622 B
TypeScript
28 lines
No EOL
622 B
TypeScript
import { TelegramLoginData } from "../types/user";
|
|
import { TelegramAvatar } from "./TelegramAvatar";
|
|
|
|
interface Props {
|
|
u: TelegramLoginData
|
|
}
|
|
|
|
export function TelegramUserInline({u}: Props) {
|
|
|
|
if(u.username) return (
|
|
<a href={`https://t.me/${u.username}`}>
|
|
<TelegramAvatar u={u}/>
|
|
{u.username}
|
|
</a>
|
|
)
|
|
else if(u.last_name) return (
|
|
<span>
|
|
<TelegramAvatar u={u}/>
|
|
{u.first_name} {u.last_name}
|
|
</span>
|
|
)
|
|
else return (
|
|
<span>
|
|
<TelegramAvatar u={u}/>
|
|
{u.first_name}
|
|
</span>
|
|
)
|
|
} |