import * as React from 'react'; import ReactMarkdown from 'react-markdown'; import LikeButton from '../../containers/LikeButton'; import CommentsNumber from '../common/CommentsNumber'; import PostStatusLabel from '../common/PostStatusLabel'; import IPostStatus from '../../interfaces/IPostStatus'; interface Props { id: number; title: string; slug?: string; description?: string; postStatus: IPostStatus; likeCount: number; showLikeCount: boolean; showLikeButtons: boolean; liked: number; commentsCount: number; isLoggedIn: boolean; authenticityToken: string; } const PostListItem = ({ id, title, slug, description, postStatus, likeCount, showLikeCount, showLikeButtons, liked, commentsCount, isLoggedIn, authenticityToken, }: Props) => (
window.location.href = `/posts/${slug || id}`} className="postListItem">
{title} {description}
{ postStatus ? : null }
); export default PostListItem;