ampache_react/app/components/Artists.jsx

28 lines
766 B
React
Raw Normal View History

2016-07-07 23:23:18 +02:00
import React, { Component, PropTypes } from "react";
import Immutable from "immutable";
2016-07-07 23:23:18 +02:00
import FilterablePaginatedGrid from "./elements/Grid";
class Artists extends Component {
2016-07-07 23:23:18 +02:00
render () {
const grid = {
isFetching: this.props.isFetching,
items: this.props.artists,
itemsLabel: "app.common.artist",
subItemsType: "albums",
subItemsLabel: "app.common.album"
};
2016-07-07 23:23:18 +02:00
return (
<FilterablePaginatedGrid grid={grid} pagination={this.props.pagination} />
2016-07-07 23:23:18 +02:00
);
}
}
Artists.propTypes = {
isFetching: PropTypes.bool.isRequired,
artists: PropTypes.instanceOf(Immutable.List).isRequired,
pagination: PropTypes.object.isRequired,
2016-07-07 23:23:18 +02:00
};
export default Artists;