Finished updating the reformatting of propTypes and set redux, intl functions to end of component
• Finished: - updating the reformatting of propTypes and set redux, intl functions to end of component • Removed: - Gif implementation
This commit is contained in:
@@ -5,29 +5,12 @@ import { defineMessages, injectIntl } from 'react-intl'
|
||||
import { expandCommunityTimeline } from '../actions/timelines'
|
||||
import StatusList from '../components/status_list'
|
||||
|
||||
const messages = defineMessages({
|
||||
empty: { id: 'empty_column.community', defaultMessage: 'The community timeline is empty. Write something publicly to get the ball rolling!' },
|
||||
})
|
||||
|
||||
const mapStateToProps = (state) => ({
|
||||
onlyMedia: state.getIn(['settings', 'community', 'other', 'onlyMedia'])
|
||||
})
|
||||
|
||||
export default
|
||||
@connect(mapStateToProps)
|
||||
@injectIntl
|
||||
class CommunityTimeline extends React.PureComponent {
|
||||
|
||||
static contextTypes = {
|
||||
router: PropTypes.object,
|
||||
}
|
||||
|
||||
static propTypes = {
|
||||
dispatch: PropTypes.func.isRequired,
|
||||
intl: PropTypes.object.isRequired,
|
||||
onlyMedia: PropTypes.bool,
|
||||
}
|
||||
|
||||
componentDidMount () {
|
||||
const { dispatch, onlyMedia } = this.props
|
||||
|
||||
@@ -64,3 +47,19 @@ class CommunityTimeline extends React.PureComponent {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const messages = defineMessages({
|
||||
empty: { id: 'empty_column.community', defaultMessage: 'The community timeline is empty. Write something publicly to get the ball rolling!' },
|
||||
})
|
||||
|
||||
const mapStateToProps = (state) => ({
|
||||
onlyMedia: state.getIn(['settings', 'community', 'other', 'onlyMedia'])
|
||||
})
|
||||
|
||||
CommunityTimeline.propTypes = {
|
||||
dispatch: PropTypes.func.isRequired,
|
||||
intl: PropTypes.object.isRequired,
|
||||
onlyMedia: PropTypes.bool,
|
||||
}
|
||||
|
||||
export default injectIntl(connect(mapStateToProps)(CommunityTimeline))
|
||||
Reference in New Issue
Block a user