1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-28 14:16:41 +07:00

messages form

This commit is contained in:
Fedor Katurov 2019-11-12 15:15:45 +07:00
parent 98c66dec8c
commit 371f47f866
7 changed files with 98 additions and 16 deletions

View file

@ -6,6 +6,7 @@ import * as AUTH_ACTIONS from '~/redux/auth/actions';
import { Message } from '~/components/profile/Message';
import { Group } from '~/components/containers/Group';
import pick from 'ramda/es/pick';
import { NodeNoComments } from '~/components/node/NodeNoComments';
const mapStateToProps = state => ({
profile: selectAuthProfile(state),
@ -25,6 +26,9 @@ const ProfileMessagesUnconnected: FC<IProps> = ({ profile, user: { id }, authGet
authGetMessages(profile.user.username);
}, [profile.user]);
if (!profile.messages.length || profile.is_loading)
return <NodeNoComments is_loading={profile.is_loading_messages || profile.is_loading} />;
return (
<Group className={styles.messages}>
{profile.messages