mirror of
https://github.com/wassname/talk.git
synced 2026-08-05 13:30:26 +08:00
50 lines
1.1 KiB
JavaScript
50 lines
1.1 KiB
JavaScript
import React, {PropTypes} from 'react';
|
|
import Comment from './Comment';
|
|
|
|
const Stream = ({
|
|
comments,
|
|
currentUser,
|
|
asset,
|
|
postItem,
|
|
addNotification,
|
|
postAction,
|
|
deleteAction,
|
|
showSignInDialog,
|
|
refetch
|
|
}) => {
|
|
return (
|
|
<div>
|
|
{
|
|
comments.map(comment => {
|
|
return <Comment
|
|
refetch={refetch}
|
|
addNotification={addNotification}
|
|
depth={0}
|
|
postItem={postItem}
|
|
asset={asset}
|
|
currentUser={currentUser}
|
|
postAction={postAction}
|
|
deleteAction={deleteAction}
|
|
showSignInDialog={showSignInDialog}
|
|
key={comment.id}
|
|
comment={comment} />;
|
|
})
|
|
}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
Stream.propTypes = {
|
|
refetch: PropTypes.func.isRequired,
|
|
addNotification: PropTypes.func.isRequired,
|
|
postItem: PropTypes.func.isRequired,
|
|
asset: PropTypes.object.isRequired,
|
|
comments: PropTypes.array.isRequired,
|
|
currentUser: PropTypes.shape({
|
|
displayName: PropTypes.string,
|
|
id: PropTypes.string
|
|
})
|
|
};
|
|
|
|
export default Stream;
|