1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00

removed profile redux items

This commit is contained in:
Fedor Katurov 2022-01-08 18:01:38 +07:00
parent 5b28313afd
commit 3c0571816c
55 changed files with 488 additions and 710 deletions

View file

@ -1,42 +1,40 @@
import React, { FC } from 'react';
import { IAuthState } from '~/redux/auth/types';
import { formatText } from '~/utils/dom';
import { PRESETS } from '~/constants/urls';
import { Placeholder } from '~/components/placeholders/Placeholder';
import React, { FC } from "react";
import { IUser } from "~/redux/auth/types";
import { formatText } from "~/utils/dom";
import { PRESETS } from "~/constants/urls";
import { Placeholder } from "~/components/placeholders/Placeholder";
import styles from './styles.module.scss';
import { Avatar } from '~/components/common/Avatar';
import { Markdown } from '~/components/containers/Markdown';
import styles from "./styles.module.scss";
import { Avatar } from "~/components/common/Avatar";
import { Markdown } from "~/components/containers/Markdown";
interface IProps {
profile: IAuthState['profile'];
profile: IUser;
isLoading: boolean;
username: string;
}
const ProfilePageLeft: FC<IProps> = ({ username, profile }) => {
const ProfilePageLeft: FC<IProps> = ({ username, profile, isLoading }) => {
return (
<div className={styles.wrap}>
<Avatar
username={username}
url={profile.user?.photo?.url}
url={profile?.photo?.url}
className={styles.avatar}
preset={PRESETS['600']}
/>
<div className={styles.region}>
<div className={styles.name}>
{profile.is_loading ? <Placeholder /> : profile?.user?.fullname}
</div>
<div className={styles.name}>{isLoading ? <Placeholder /> : profile?.fullname}</div>`
<div className={styles.username}>
{profile.is_loading ? <Placeholder /> : `~${profile?.user?.username}`}
{isLoading ? <Placeholder /> : `~${profile?.username}`}
</div>
</div>
{profile && profile.user && profile.user.description && (
{!!profile?.description && (
<Markdown
className={styles.description}
dangerouslySetInnerHTML={{ __html: formatText(profile.user.description) }}
dangerouslySetInnerHTML={{ __html: formatText(profile.description) }}
/>
)}
</div>