ampache_react/app/components/Albums.jsx
Phyks (Lucas Verney) 40f6223bd0 Use Immutable, enhance i18n, pagination in the store
* 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
2016-08-01 00:30:44 +02:00

26 lines
751 B
JavaScript

import React, { Component, PropTypes } from "react";
import Immutable from "immutable";
import FilterablePaginatedGrid from "./elements/Grid";
export default class Albums extends Component {
render () {
const grid = {
isFetching: this.props.isFetching,
items: this.props.albums,
itemsLabel: "app.common.album",
subItemsType: "tracks",
subItemsLabel: "app.common.track"
};
return (
<FilterablePaginatedGrid grid={grid} pagination={this.props.pagination} />
);
}
}
Albums.propTypes = {
isFetching: PropTypes.bool.isRequired,
albums: PropTypes.instanceOf(Immutable.List).isRequired,
pagination: PropTypes.object.isRequired,
};