mirror of
https://github.com/Steffo99/festa.git
synced 2024-12-23 07:04:22 +00:00
24 lines
No EOL
477 B
TypeScript
24 lines
No EOL
477 B
TypeScript
import { UserData } from "../utils/telegram";
|
|
|
|
interface TelegramUserLinkProps {
|
|
u: UserData
|
|
}
|
|
|
|
export function TelegramUserLink({u}: TelegramUserLinkProps) {
|
|
|
|
if(u.username) return (
|
|
<a href={`https://t.me/${u.username}`}>
|
|
{u.username}
|
|
</a>
|
|
)
|
|
else if(u.last_name) return (
|
|
<span>
|
|
{u.first_name} {u.last_name}
|
|
</span>
|
|
)
|
|
else return (
|
|
<span>
|
|
u.first_name
|
|
</span>
|
|
)
|
|
} |