mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 11:17:49 +01:00
Add Redux and use it for state management
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import * as React from 'react';
|
||||
|
||||
import IPostStatus from '../../interfaces/IPostStatus';
|
||||
|
||||
interface Props {
|
||||
title: string;
|
||||
description?: string;
|
||||
postStatus: {name: string, color: string};
|
||||
postStatus: IPostStatus;
|
||||
}
|
||||
|
||||
const PostListItem = ({ title, description, postStatus}: Props) => (
|
||||
@@ -23,10 +25,15 @@ const PostListItem = ({ title, description, postStatus}: Props) => (
|
||||
<span className="comment icon"></span>
|
||||
<span>0 comments</span>
|
||||
</div>
|
||||
<div className="postDetailsStatus">
|
||||
<div className="dot" style={{backgroundColor: postStatus.color}}></div>
|
||||
<span className="postStatusName">{postStatus.name}</span>
|
||||
</div>
|
||||
{
|
||||
postStatus ?
|
||||
<div className="postDetailsStatus">
|
||||
<div className="dot" style={{backgroundColor: postStatus.color}}></div>
|
||||
<span className="postStatusName">{postStatus.name}</span>
|
||||
</div>
|
||||
:
|
||||
null
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user