mirror of
https://github.com/wassname/talk.git
synced 2026-08-14 12:50:17 +08:00
Get rid of data direct dependency in the plugins
This commit is contained in:
@@ -18,8 +18,8 @@ class Comment extends React.Component {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { comment, asset, root, data } = this.props;
|
||||
const slotPassthrough = { data, comment, asset, root };
|
||||
const { comment, asset, root } = this.props;
|
||||
const slotPassthrough = { comment, asset, root };
|
||||
return (
|
||||
<div className={cn(styles.root, `${pluginName}-comment`)}>
|
||||
<Slot
|
||||
@@ -62,12 +62,7 @@ class Comment extends React.Component {
|
||||
inline
|
||||
/>
|
||||
|
||||
<FeaturedButton
|
||||
root={root}
|
||||
data={data}
|
||||
comment={comment}
|
||||
asset={asset}
|
||||
/>
|
||||
<FeaturedButton root={root} comment={comment} asset={asset} />
|
||||
</div>
|
||||
<div
|
||||
className={cn(
|
||||
|
||||
@@ -22,7 +22,6 @@ class TabPane extends React.Component {
|
||||
render() {
|
||||
const {
|
||||
root,
|
||||
data,
|
||||
asset: { featuredComments, ...asset },
|
||||
viewComment,
|
||||
} = this.props;
|
||||
@@ -32,7 +31,6 @@ class TabPane extends React.Component {
|
||||
<Comment
|
||||
key={comment.id}
|
||||
root={root}
|
||||
data={data}
|
||||
comment={comment}
|
||||
asset={asset}
|
||||
viewComment={viewComment}
|
||||
|
||||
Reference in New Issue
Block a user