You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
932 B

  1. import { connect } from 'react-redux';
  2. import PureRenderMixin from 'react-addons-pure-render-mixin';
  3. import StatusListContainer from '../ui/containers/status_list_container';
  4. import Column from '../ui/components/column';
  5. import { refreshTimeline } from '../../actions/timelines';
  6. import { defineMessages, injectIntl } from 'react-intl';
  7. const messages = defineMessages({
  8. title: { id: 'column.home', defaultMessage: 'Home' }
  9. });
  10. const HomeTimeline = React.createClass({
  11. propTypes: {
  12. dispatch: React.PropTypes.func.isRequired
  13. },
  14. mixins: [PureRenderMixin],
  15. componentWillMount () {
  16. this.props.dispatch(refreshTimeline('home'));
  17. },
  18. render () {
  19. const { intl } = this.props;
  20. return (
  21. <Column icon='home' heading={intl.formatMessage(messages.title)}>
  22. <StatusListContainer {...this.props} type='home' />
  23. </Column>
  24. );
  25. },
  26. });
  27. export default connect()(injectIntl(HomeTimeline));