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