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:
parent
371f47f866
commit
7f04fe1e36
7 changed files with 59 additions and 3 deletions
|
@ -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} />;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue