Pagination funcionando bien
This commit is contained in:
@@ -70,6 +70,7 @@ export class Search extends React.Component {
|
||||
render() {
|
||||
if (this.state.artists) {
|
||||
const total = this.state.artists.paginate.total;
|
||||
const currentPage = this.state.artists.paginate.current_page;
|
||||
const pageLimit = this.state.artists.paginate.per_page;
|
||||
|
||||
return (
|
||||
@@ -77,7 +78,7 @@ export class Search extends React.Component {
|
||||
<h1>Busqueda</h1>
|
||||
<SearchBar query={this.getParams().query}/>
|
||||
<SearchList artists={this.state.artists.artists}/>
|
||||
<Paginate totalRecords={total} pageLimit={pageLimit} pageNeighbours={1} onPageChanged={this.handlePageChange} makeLink={this.makeLink}/>
|
||||
<Paginate totalRecords={total} pageLimit={pageLimit} currentPage={currentPage} pageNeighbours={1} onPageChanged={this.handlePageChange} makeLink={this.makeLink}/>
|
||||
<ReactJson src={this.state.artists} enableClipboard={false} displayDataTypes={false}/>
|
||||
</main>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user