Continuing updating the reformatting of propTypes and set redux, intl functions to end of component

Continuing updating the reformatting of propTypes and set redux, intl functions to end of component
This commit is contained in:
mgabdev
2020-08-18 12:07:47 -05:00
parent 1c2cb6a63a
commit e5f4e12b7b
37 changed files with 834 additions and 931 deletions

View File

@@ -8,27 +8,12 @@ import StatusContainer from '../../containers/status_container'
import Text from '../text'
import ModalLayout from './modal_layout'
const messages = defineMessages({
removeRepost: { id: 'status.cancel_repost_private', defaultMessage: 'Remove Repost' },
repost: { id: 'status.repost', defaultMessage: 'Repost' },
combo: { id: 'boost_modal.combo', defaultMessage: 'You can press Shift + Repost to skip this next time' },
})
export default
@injectIntl
class BoostModal extends ImmutablePureComponent {
static contextTypes = {
router: PropTypes.object,
}
static propTypes = {
status: ImmutablePropTypes.map.isRequired,
onRepost: PropTypes.func.isRequired,
onClose: PropTypes.func.isRequired,
intl: PropTypes.object.isRequired,
}
componentDidMount() {
this.button.focus()
}
@@ -80,3 +65,18 @@ class BoostModal extends ImmutablePureComponent {
}
}
const messages = defineMessages({
removeRepost: { id: 'status.cancel_repost_private', defaultMessage: 'Remove Repost' },
repost: { id: 'status.repost', defaultMessage: 'Repost' },
combo: { id: 'boost_modal.combo', defaultMessage: 'You can press Shift + Repost to skip this next time' },
})
BoostModal.propTypes = {
status: ImmutablePropTypes.map.isRequired,
onRepost: PropTypes.func.isRequired,
onClose: PropTypes.func.isRequired,
intl: PropTypes.object.isRequired,
}
export default injectIntl(BoostModal)