add pass onreply callback through thread component to children

This commit is contained in:
igoradamenko
2018-02-02 23:48:11 +02:00
parent b027dd48c7
commit 87683bd91c
+2 -1
View File
@@ -8,13 +8,14 @@ export default class Thread extends Component {
return (
<div className={b('thread', props)}>
<Comment data={comment} mods={{ level: mods.level }}/>
<Comment data={comment} mods={{ level: mods.level }} onReply={props.onReply}/>
{
!!replies.length && replies.map(thread => (
<Thread
data={thread}
mods={{ level: mods.level < 5 ? mods.level + 1 : mods.level }}
onReply={props.onReply}
/>
))
}