import React, { FC, useMemo } from 'react'; import styles from './styles.scss'; import { IAuthState } from '~/redux/auth/types'; import { getURL } from '~/utils/dom'; import { PRESETS, URLS } from '~/constants/urls'; import { Placeholder } from '~/components/placeholders/Placeholder'; import { Link } from 'react-router-dom'; import { Icon } from '~/components/input/Icon'; interface IProps { profile: IAuthState['profile']; username: string; } const ProfilePageLeft: FC = ({ username, profile }) => { const thumb = useMemo(() => { if (!profile || !profile.user || !profile.user.photo) return ''; return getURL(profile.user.photo, PRESETS.small_hero); }, [profile]); return (
{profile.is_loading ? : profile.user.fullname}
{profile.is_loading ? : `~${profile.user.username}`}
Профиль Настройки Сообщения
); }; export { ProfilePageLeft };