* update npm/gem dependencies * move to react prop-types package and fix jsdom usage * fix sinon * fix test support * eslint?
29 lines
673 B
JavaScript
29 lines
673 B
JavaScript
import React, { Component } from 'react'
|
|
import PropTypes from 'prop-types'
|
|
|
|
import EmbedlyLink from './EmbedlyLink'
|
|
|
|
class Attachments extends Component {
|
|
render = () => {
|
|
const { topic, authorizedToEdit, updateTopic } = this.props
|
|
const link = topic.get('link')
|
|
|
|
return (
|
|
<div className="attachments">
|
|
<EmbedlyLink topicId={topic.id}
|
|
link={link}
|
|
authorizedToEdit={authorizedToEdit}
|
|
updateTopic={updateTopic}
|
|
/>
|
|
</div>
|
|
)
|
|
}
|
|
}
|
|
|
|
Attachments.propTypes = {
|
|
topic: PropTypes.object, // Backbone object
|
|
authorizedToEdit: PropTypes.bool,
|
|
updateTopic: PropTypes.func
|
|
}
|
|
|
|
export default Attachments
|