diff options
Diffstat (limited to 'app/assets/javascripts/components/features/compose/components/upload_form.jsx')
-rw-r--r-- | app/assets/javascripts/components/features/compose/components/upload_form.jsx | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/app/assets/javascripts/components/features/compose/components/upload_form.jsx b/app/assets/javascripts/components/features/compose/components/upload_form.jsx index 77590d90d..f28944ad5 100644 --- a/app/assets/javascripts/components/features/compose/components/upload_form.jsx +++ b/app/assets/javascripts/components/features/compose/components/upload_form.jsx @@ -1,5 +1,5 @@ -import PureRenderMixin from 'react-addons-pure-render-mixin'; import ImmutablePropTypes from 'react-immutable-proptypes'; +import PropTypes from 'prop-types'; import IconButton from '../../../components/icon_button'; import { defineMessages, injectIntl } from 'react-intl'; import UploadProgressContainer from '../containers/upload_progress_container'; @@ -9,15 +9,7 @@ const messages = defineMessages({ undo: { id: 'upload_form.undo', defaultMessage: 'Undo' } }); -const UploadForm = React.createClass({ - - propTypes: { - media: ImmutablePropTypes.list.isRequired, - onRemoveFile: React.PropTypes.func.isRequired, - intl: React.PropTypes.object.isRequired - }, - - mixins: [PureRenderMixin], +class UploadForm extends React.PureComponent { render () { const { intl, media } = this.props; @@ -42,6 +34,12 @@ const UploadForm = React.createClass({ ); } -}); +} + +UploadForm.propTypes = { + media: ImmutablePropTypes.list.isRequired, + onRemoveFile: PropTypes.func.isRequired, + intl: PropTypes.object.isRequired +}; export default injectIntl(UploadForm); |