mirror of
https://github.com/Steffo99/festa.git
synced 2024-12-23 07:04:22 +00:00
21 lines
473 B
TypeScript
21 lines
473 B
TypeScript
|
import { LoginContext } from "../contexts/login";
|
||
|
import { useDefinedContext } from "../utils/definedContext";
|
||
|
import { UserData } from "../utils/telegram";
|
||
|
|
||
|
|
||
|
export interface TelegramAvatarProps {
|
||
|
u: UserData
|
||
|
}
|
||
|
|
||
|
|
||
|
export function TelegramAvatar({u}: TelegramAvatarProps) {
|
||
|
const [login, _] = useDefinedContext(LoginContext)
|
||
|
|
||
|
return login ?
|
||
|
<img
|
||
|
src={u.photo_url}
|
||
|
className="avatar-telegram-inline"
|
||
|
/>
|
||
|
:
|
||
|
null
|
||
|
}
|