mirror of
https://github.com/wassname/talk.git
synced 2026-08-03 13:20:59 +08:00
36 lines
956 B
JavaScript
36 lines
956 B
JavaScript
import React, {PropTypes} from 'react';
|
|
|
|
import Comment from './components/Comment';
|
|
import {actionsMap} from './helpers/moderationQueueActionsMap';
|
|
|
|
const ModerationQueue = ({activeTab = 'premod', ...props}) => {
|
|
return (
|
|
<div id="moderationList">
|
|
<ul>
|
|
{
|
|
props.data[activeTab].map((comment, i) => {
|
|
const status = comment.action_summaries ? 'FLAGGED' : comment.status;
|
|
return <Comment
|
|
key={i}
|
|
index={i}
|
|
comment={comment}
|
|
suspectWords={props.suspectWords}
|
|
actions={actionsMap[status]}
|
|
showBanUserDialog={props.showBanUserDialog}
|
|
acceptComment={props.acceptComment}
|
|
rejectComment={props.rejectComment}
|
|
currentAsset={props.currentAsset}
|
|
/>;
|
|
})
|
|
}
|
|
</ul>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
ModerationQueue.propTypes = {
|
|
data: PropTypes.object.isRequired
|
|
};
|
|
|
|
export default ModerationQueue;
|