Phyks (Lucas Verney)
40f6223bd0
* Keep track of pagination in the store * Use Immutable in reducers * Finish i18n, every available strings are now translated in English and French * Add a loading indicator * Premises of API error handling * Better locale negotiation
28 lines
766 B
JavaScript
28 lines
766 B
JavaScript
import React, { Component, PropTypes } from "react";
|
|
import Immutable from "immutable";
|
|
|
|
import FilterablePaginatedGrid from "./elements/Grid";
|
|
|
|
class Artists extends Component {
|
|
render () {
|
|
const grid = {
|
|
isFetching: this.props.isFetching,
|
|
items: this.props.artists,
|
|
itemsLabel: "app.common.artist",
|
|
subItemsType: "albums",
|
|
subItemsLabel: "app.common.album"
|
|
};
|
|
return (
|
|
<FilterablePaginatedGrid grid={grid} pagination={this.props.pagination} />
|
|
);
|
|
}
|
|
}
|
|
|
|
Artists.propTypes = {
|
|
isFetching: PropTypes.bool.isRequired,
|
|
artists: PropTypes.instanceOf(Immutable.List).isRequired,
|
|
pagination: PropTypes.object.isRequired,
|
|
};
|
|
|
|
export default Artists;
|