Reducers refactor, working Moderate Queue

This commit is contained in:
Belen Curcio
2017-02-09 07:00:39 -03:00
parent dc35425afd
commit e234fa7e0b
11 changed files with 325 additions and 206 deletions
@@ -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;