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

displaying user description

This commit is contained in:
Fedor Katurov 2019-11-12 15:31:51 +07:00
parent 371f47f866
commit 7f04fe1e36
7 changed files with 59 additions and 3 deletions

View file

@ -26,6 +26,15 @@ const ProfileMessagesUnconnected: FC<IProps> = ({ profile, user: { id }, authGet
authGetMessages(profile.user.username);
}, [profile.user]);
useEffect(() => {
if (profile.is_loading || !profile.user || !profile.user.username || profile.messages_error)
return;
const timer = setTimeout(() => authGetMessages(profile.user.username), 20000);
return () => clearTimeout(timer);
}, [profile.user, profile.messages]);
if (!profile.messages.length || profile.is_loading)
return <NodeNoComments is_loading={profile.is_loading_messages || profile.is_loading} />;