2020-08-17 21:07:16 +01:00
|
|
|
import React from 'react'
|
2020-08-17 21:59:29 +01:00
|
|
|
import PropTypes from 'prop-types'
|
2020-05-03 06:22:49 +01:00
|
|
|
import { defineMessages, injectIntl } from 'react-intl'
|
|
|
|
import ImmutablePureComponent from 'react-immutable-pure-component'
|
|
|
|
import ImmutablePropTypes from 'react-immutable-proptypes'
|
2020-08-18 17:05:00 +01:00
|
|
|
import { StatusReposts } from '../../features/ui/util/async_components'
|
|
|
|
import WrappedBundle from '../../features/ui/util/wrapped_bundle'
|
2020-05-03 06:22:49 +01:00
|
|
|
import ModalLayout from './modal_layout'
|
|
|
|
|
|
|
|
class StatusRepostsModal extends ImmutablePureComponent {
|
|
|
|
|
|
|
|
render() {
|
|
|
|
const {
|
|
|
|
intl,
|
|
|
|
onClose,
|
|
|
|
status,
|
|
|
|
} = this.props
|
|
|
|
|
|
|
|
const params = {
|
|
|
|
statusId: status.get('id'),
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
|
|
|
<ModalLayout
|
|
|
|
title={intl.formatMessage(messages.title)}
|
|
|
|
width={460}
|
|
|
|
onClose={onClose}
|
|
|
|
noPadding
|
|
|
|
>
|
2020-08-18 17:05:00 +01:00
|
|
|
<WrappedBundle component={StatusReposts} componentParams={params} />
|
2020-05-03 06:22:49 +01:00
|
|
|
</ModalLayout>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2020-08-18 18:07:47 +01:00
|
|
|
|
|
|
|
const messages = defineMessages({
|
|
|
|
title: { id: 'reposts', defaultMessage: 'Reposts' },
|
|
|
|
})
|
|
|
|
|
|
|
|
StatusRepostsModal.propTypes = {
|
|
|
|
intl: PropTypes.object.isRequired,
|
|
|
|
onClose: PropTypes.func.isRequired,
|
|
|
|
status: ImmutablePropTypes.map.isRequired,
|
|
|
|
}
|
|
|
|
|
|
|
|
export default injectIntl(StatusRepostsModal)
|