1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

messages form at the bottom

This commit is contained in:
Fedor Katurov 2020-09-09 13:32:28 +07:00
parent a8dc543c3c
commit 2e0332218b
5 changed files with 97 additions and 35 deletions

View file

@ -1,12 +1,10 @@
import React, { FC } from 'react';
import React, { FC, ReactNode } from 'react';
import { IUser } from '~/redux/auth/types';
import styles from './styles.scss';
import { Group } from '~/components/containers/Group';
import { Placeholder } from '~/components/placeholders/Placeholder';
import { getURL, getPrettyDate } from '~/utils/dom';
import { PRESETS } from '~/constants/urls';
import { getPrettyDate } from '~/utils/dom';
import { ProfileTabs } from '../ProfileTabs';
import { MessageForm } from '~/components/profile/MessageForm';
import { ProfileAvatar } from '../ProfileAvatar';
interface IProps {
@ -17,13 +15,11 @@ interface IProps {
is_own?: boolean;
setTab?: (tab: string) => void;
content?: ReactNode;
}
const TAB_HEADERS = {
messages: <MessageForm />,
};
const ProfileInfo: FC<IProps> = ({ user, tab, is_loading, is_own, setTab }) => (
const ProfileInfo: FC<IProps> = ({ user, tab, is_loading, is_own, setTab, content = null }) => (
<div>
<Group className={styles.wrap} horizontal>
<ProfileAvatar />
@ -41,7 +37,7 @@ const ProfileInfo: FC<IProps> = ({ user, tab, is_loading, is_own, setTab }) => (
<ProfileTabs tab={tab} is_own={is_own} setTab={setTab} />
{TAB_HEADERS[tab] || null}
{content}
</div>
);