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

fixed boris image and layout

This commit is contained in:
Fedor Katurov 2022-01-20 14:16:43 +07:00
parent b4099a6c45
commit e465f72034
6 changed files with 19 additions and 55 deletions

View file

@ -10,8 +10,6 @@ import { CommentContextProvider, useCommentContext } from '~/utils/context/Comme
import { useNodeContext } from '~/utils/context/NodeContextProvider';
import { useUserContext } from '~/utils/context/UserContextProvider';
import styles from './styles.module.scss';
interface IProps {}
const BorisComments: FC<IProps> = () => {
@ -30,29 +28,27 @@ const BorisComments: FC<IProps> = () => {
const { node } = useNodeContext();
return (
<>
<Group className={styles.grid}>
<CommentContextProvider
onSaveComment={onSaveComment}
comments={comments}
hasMore={hasMore}
onDeleteComment={onDeleteComment}
onLoadMoreComments={onLoadMoreComments}
onShowImageModal={onShowImageModal}
isLoading={isLoading}
>
<Group>
{isUser && <NodeCommentForm user={user} nodeId={node.id} saveComment={onSaveComment} />}
{isLoading ? (
{isLoading || !comments?.length ? (
<NodeNoComments is_loading count={7} />
) : (
<CommentContextProvider
onSaveComment={onSaveComment}
comments={comments}
hasMore={hasMore}
onDeleteComment={onDeleteComment}
onLoadMoreComments={onLoadMoreComments}
onShowImageModal={onShowImageModal}
isLoading={isLoading}
>
<NodeComments order="ASC" />
</CommentContextProvider>
<NodeComments order="ASC" />
)}
</Group>
<Footer />
</>
<Footer />
</Group>
</CommentContextProvider>
);
};

View file

@ -1,18 +0,0 @@
@import "src/styles/variables.scss";
.content {
flex: 4;
z-index: 2;
border-radius: $radius;
padding: $gap;
background: $node_bg;
box-shadow: inset transparentize(mix($wisegreen, white, 60%), 0.6) 0 1px;
@include desktop {
flex: 2.5;
}
@media(max-width: 1024px) {
flex: 2;
}
}