diff options
author | Vitaly Takmazov | 2019-04-04 21:09:08 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-01-13 10:37:54 +0300 |
commit | efdb2c2665125b6ff09da5bf35b4396ef6f028f9 (patch) | |
tree | f1ff711d5e88cb33569428e91dbc02be8f52a982 /vnext/src/components/Thread.js | |
parent | adf06c76465fe90e2d28fef80c0f9e79dd472226 (diff) |
Recommendations in feeds
Diffstat (limited to 'vnext/src/components/Thread.js')
-rw-r--r-- | vnext/src/components/Thread.js | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/vnext/src/components/Thread.js b/vnext/src/components/Thread.js index f94ad358..6d8a5fd3 100644 --- a/vnext/src/components/Thread.js +++ b/vnext/src/components/Thread.js @@ -11,7 +11,6 @@ import MessageInput from './MessageInput'; import Spinner from './Spinner'; import Avatar from './Avatar'; import Button from './Button'; -import { UserLink } from './UserInfo'; import { format } from '../utils/embed'; @@ -85,7 +84,6 @@ export default class Thread extends React.Component { msg.mid ? ( <Message data={msg} visitor={this.props.visitor}> {this.state.active === (msg.rid || 0) && <MessageInput data={msg} onSend={this.postComment}>Write a comment...</MessageInput>} - <Recommendations forMessage={msg} /> </Message> ) : ( <Spinner /> @@ -157,19 +155,3 @@ Thread.propTypes = { match: ReactRouterPropTypes.match, visitor: UserType.isRequired }; - -function Recommendations({ forMessage, ...rest }) { - const { likes, recommendations } = forMessage; - return recommendations && recommendations.length > 0 && ( - <div className="msg-recomms">{'Recommended by '} - { - recommendations.map(it => ( - <UserLink key={it.uri || it.uid} user={it} /> - )).reduce((prev, curr) => [prev, ', ', curr]) - } - { - likes > recommendations.length && (<span> and {likes - recommendations.length} others</span>) - } - </div> - ) || null; -} |