Pass correct slot props

This commit is contained in:
Chi Vinh Le
2017-07-19 23:37:35 +07:00
parent cc1026233f
commit 47a5b84a74
2 changed files with 6 additions and 3 deletions
@@ -13,7 +13,7 @@ class FeaturedComment extends React.Component {
}
render() {
const {comment, asset} = this.props;
const {comment, asset, root, data} = this.props;
return (
<div className={cn(styles.featuredComment, `${name}__featured-comment`)}>
@@ -35,8 +35,9 @@ class FeaturedComment extends React.Component {
<Slot
fill="commentReactions"
root={root}
data={data}
comment={comment}
commentId={comment.id}
asset={asset}
inline
/>
@@ -1,11 +1,13 @@
import React from 'react';
import FeaturedComment from './FeaturedComment';
export default ({asset: {featuredComments, ...asset}, viewComment}) => (
export default ({root, data, asset: {featuredComments, ...asset}, viewComment}) => (
<div>
{featuredComments.nodes.map((comment) =>
<FeaturedComment
key={comment.id}
root={root}
data={data}
comment={comment}
asset={asset}
viewComment={viewComment} />