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

let users like comments

This commit is contained in:
Fedor Katurov 2023-11-01 20:56:47 +06:00
parent 822f51f5de
commit bd802ede10
22 changed files with 332 additions and 154 deletions

View file

@ -22,6 +22,7 @@ const BorisPage: VFC = observer(() => {
onLoadMoreComments,
onDelete: onDeleteComment,
onEdit: onSaveComment,
onLike: onLikeComment,
comments,
hasMore,
isLoading: isLoadingComments,
@ -36,6 +37,7 @@ const BorisPage: VFC = observer(() => {
onSaveComment={onSaveComment}
comments={comments}
hasMore={hasMore}
onLike={onLikeComment}
isLoading={isLoadingComments}
isLoadingMore={isLoadingMore}
onShowImageModal={onShowImageModal}

View file

@ -91,7 +91,7 @@ export const getStaticProps = async (
revalidate: 7 * 86400, // every week
};
} catch (error) {
console.warn('[NEXT] can\'t generate node: ', error);
console.warn("[NEXT] can't generate node: ", error);
return {
notFound: true,
};
@ -112,6 +112,7 @@ const NodePage: FC<Props> = observer((props) => {
const {
onLoadMoreComments,
onLike: onLikeComment,
onDelete: onDeleteComment,
onEdit: onSaveComment,
comments,
@ -141,6 +142,7 @@ const NodePage: FC<Props> = observer((props) => {
>
<NodeRelatedProvider id={parseInt(id, 10)} tags={node.tags}>
<CommentContextProvider
onLike={onLikeComment}
onSaveComment={onSaveComment}
comments={comments}
hasMore={hasMore}