mirror of
https://github.com/wassname/talk.git
synced 2026-08-16 11:29:31 +08:00
Pass correct slot props
This commit is contained in:
@@ -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} />
|
||||
|
||||
Reference in New Issue
Block a user