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

fixed comment loader animation

This commit is contained in:
Fedor Katurov 2022-12-26 13:54:35 +06:00
parent 85f3de775a
commit c30ecc1b81
4 changed files with 56 additions and 28 deletions

View file

@ -17,27 +17,27 @@ const BorisComments: FC<IProps> = () => {
const user = useUserContext();
const { isUser } = useAuth();
const {
isLoading,
comments,
onSaveComment,
} = useCommentContext();
const { isLoading, comments, onSaveComment } = useCommentContext();
const { node } = useNodeContext();
return (
<Group>
{(isUser || isSSR) && (
<NodeCommentFormSSR user={user} nodeId={node.id} saveComment={onSaveComment} />
)}
<Group>
{(isUser || isSSR) && (
<NodeCommentFormSSR
user={user}
nodeId={node.id}
saveComment={onSaveComment}
/>
)}
{isLoading || !comments?.length ? (
<NodeNoComments is_loading count={7} />
) : (
<NodeComments order="ASC" />
)}
{isLoading || !comments?.length ? (
<NodeNoComments loading count={7} />
) : (
<NodeComments order="ASC" />
)}
<Footer />
</Group>
<Footer />
</Group>
);
};