mirror of
https://github.com/wassname/talk.git
synced 2026-08-09 12:30:42 +08:00
Reducers refactor, working Moderate Queue
This commit is contained in:
@@ -1,22 +1,29 @@
|
||||
import React from 'react';
|
||||
import React, {PropTypes} from 'react';
|
||||
|
||||
// import Comment from '../../components/Comment';
|
||||
import Comment from './components/Comment';
|
||||
|
||||
export default (props) => {
|
||||
const ModerationQueue = props => {
|
||||
return (
|
||||
<div>
|
||||
{/* <Comment*/}
|
||||
{/* comment={comment}*/}
|
||||
{/* key={i}*/}
|
||||
{/* author={comment.user}*/}
|
||||
{/* />*/}
|
||||
<ul>
|
||||
{
|
||||
props.data[props.activeTab].map((comment, i) =>
|
||||
<div key={i}>
|
||||
{comment.body}
|
||||
</div>
|
||||
)
|
||||
props.data[props.activeTab].map((comment, i) => {
|
||||
console.log(comment);
|
||||
return <Comment
|
||||
key={i}
|
||||
index={i}
|
||||
suspectWords={props.suspectWords}
|
||||
{...comment}
|
||||
/>;
|
||||
})
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
ModerationQueue.propTypes = {
|
||||
data: PropTypes.object.isRequired
|
||||
};
|
||||
|
||||
export default ModerationQueue;
|
||||
|
||||
Reference in New Issue
Block a user