Improve Post component

This commit is contained in:
riggraz
2019-09-12 18:03:19 +02:00
parent f599471af1
commit e649588211
11 changed files with 50 additions and 36 deletions

View File

@@ -1,5 +1,7 @@
import * as React from 'react';
import PostStatusLabel from '../shared/PostStatusLabel';
import IPostStatus from '../../interfaces/IPostStatus';
interface Props {
@@ -26,15 +28,7 @@ const PostListItem = ({ id, title, description, postStatus}: Props) => (
<span className="comment icon"></span>
<span>0 comments</span>
</div>
{
postStatus ?
<div className="postDetailsStatus">
<div className="dot" style={{backgroundColor: postStatus.color}}></div>
<span className="postStatusName">{postStatus.name}</span>
</div>
:
null
}
{ postStatus ? <PostStatusLabel {...postStatus} /> : null }
</div>
</div>
</a>