mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 03:37:56 +01:00
Add setting to manage visibility of vote count, vote button and decide root page (#197)
This commit is contained in:
committed by
GitHub
parent
d4242dd78e
commit
e7335f5622
@@ -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;
|
||||
}),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user