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

@@ -14,6 +14,8 @@ import IPostStatus from '../../interfaces/IPostStatus';
interface Props {
posts: Array<IPost>;
showLikeCount: boolean;
showLikeButtons: boolean;
postStatuses: Array<IPostStatus>;
areLoading: boolean;
error: string;
@@ -27,6 +29,8 @@ interface Props {
const PostList = ({
posts,
showLikeCount,
showLikeButtons,
postStatuses,
areLoading,
error,
@@ -53,7 +57,9 @@ const PostList = ({
title={post.title}
description={post.description}
postStatus={postStatuses.find(postStatus => postStatus.id === post.postStatusId)}
likesCount={post.likesCount}
likeCount={post.likeCount}
showLikeCount={showLikeCount}
showLikeButtons={showLikeButtons}
liked={post.liked}
commentsCount={post.commentsCount}