ampache_react/app/components/Albums.jsx

27 lines
783 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";
export default class Albums extends Component {
render () {
const grid = {
isFetching: this.props.isFetching,
items: this.props.albums,
2016-08-02 13:07:12 +02:00
itemsType: "album",
itemsLabel: "app.common.album",
subItemsType: "tracks",
subItemsLabel: "app.common.track"
};
2016-07-07 23:23:18 +02:00
return (
<FilterablePaginatedGrid grid={grid} pagination={this.props.pagination} />
2016-07-07 23:23:18 +02:00
);
}
}
Albums.propTypes = {
isFetching: PropTypes.bool.isRequired,
albums: PropTypes.instanceOf(Immutable.List).isRequired,
pagination: PropTypes.object.isRequired,
2016-07-07 23:23:18 +02:00
};