Add loading indicator for trending tags (#7693)

This commit is contained in:
Yamagishi Kazutoshi 2018-06-01 21:22:42 +09:00 committed by Eugen Rochko
parent bfa12239e8
commit 69b45350fe
6 changed files with 104 additions and 41 deletions

View file

@ -0,0 +1,15 @@
import { connect } from 'react-redux';
import { injectIntl } from 'react-intl';
import { fetchTrends } from '../../../actions/trends';
import Trends from '../components/trends';
const mapStateToProps = state => ({
trends: state.getIn(['trends', 'items']),
loading: state.getIn(['trends', 'isLoading']),
});
const mapDispatchToProps = dispatch => ({
fetchTrends: () => dispatch(fetchTrends()),
});
export default injectIntl(connect(mapStateToProps, mapDispatchToProps)(Trends));