mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 11:17:49 +01:00
30 lines
853 B
TypeScript
30 lines
853 B
TypeScript
import * as React from 'react';
|
|
|
|
import CommentsNumber from '../shared/CommentsNumber';
|
|
import PostStatusLabel from '../shared/PostStatusLabel';
|
|
import { TitleText, DescriptionText } from '../shared/CustomTexts';
|
|
|
|
import IPostStatus from '../../interfaces/IPostStatus';
|
|
|
|
interface Props {
|
|
id: number;
|
|
title: string;
|
|
description?: string;
|
|
postStatus: IPostStatus;
|
|
}
|
|
|
|
const PostListItem = ({ id, title, description, postStatus}: Props) => (
|
|
<a href={`/posts/${id}`} className="postLink">
|
|
<div className="postListItem">
|
|
<span className="postTitle">{title}</span>
|
|
<DescriptionText limit={120}>{description}</DescriptionText>
|
|
|
|
<div className="postDetails">
|
|
<CommentsNumber number={0} />
|
|
{ postStatus ? <PostStatusLabel {...postStatus} /> : null }
|
|
</div>
|
|
</div>
|
|
</a>
|
|
);
|
|
|
|
export default PostListItem; |