Add setting to manage visibility of vote count, vote button and decide root page (#197)

This commit is contained in:
Riccardo Graziosi
2023-02-05 11:55:38 +01:00
committed by GitHub
parent d4242dd78e
commit e7335f5622
35 changed files with 246 additions and 48 deletions

View File

@@ -104,9 +104,9 @@ const postsReducer = (
items: state.items.map(post => {
if (action.postId === post.id) {
return action.isLike ?
{ ...post, likesCount: post.likesCount + 1, liked: 1 }
{ ...post, likeCount: post.likeCount + 1, liked: 1 }
:
{ ...post, likesCount: post.likesCount - 1, liked: 0 }
{ ...post, likeCount: post.likeCount - 1, liked: 0 }
} else return post;
}),
};