mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
hotfix for returning actual first results page
This commit is contained in:
parent
bfd48fec79
commit
26b663a09c
6
client/package-lock.json
generated
6
client/package-lock.json
generated
@ -1031,9 +1031,9 @@
|
||||
"integrity": "sha512-c1LvaH+e1tzow0gZLwSWe19ap+DrZuNmZfxBdwEVEPQXarI0jTXa5qVDoiBow8kBWaqSIUgFAzQOJW8rKdlS1A=="
|
||||
},
|
||||
"@oceanprotocol/squid": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/@oceanprotocol/squid/-/squid-0.5.1.tgz",
|
||||
"integrity": "sha512-YJewmMIpHG5cjsOsgOynky7z+5YT7l5+niW9AqCMOoMGy76VEe1+6nmAhZ/PB9BtIpYCGWOl1Y68I32qhX9IWQ==",
|
||||
"version": "0.5.2",
|
||||
"resolved": "https://registry.npmjs.org/@oceanprotocol/squid/-/squid-0.5.2.tgz",
|
||||
"integrity": "sha512-HBxBP2N0M1EPX/rJ9wyP4bR+9c2z9pOH4ozOYLZl3ycSJvAQ23eyJsXL1fxYHBwMmHtcLcrVa49l3Iuxq3HOaA==",
|
||||
"requires": {
|
||||
"@oceanprotocol/keeper-contracts": "^0.9.0",
|
||||
"bignumber.js": "^8.0.1",
|
||||
|
@ -47,7 +47,7 @@ export default class Pagination extends PureComponent<{
|
||||
}> {
|
||||
public render() {
|
||||
const { currentPage, totalPages, prevPage, setPage } = this.props
|
||||
const isFirst = currentPage === 1
|
||||
const isFirst = currentPage === 0
|
||||
const isLast = currentPage === totalPages
|
||||
|
||||
return totalPages > 1 ? (
|
||||
|
@ -28,7 +28,7 @@ export default class Search extends PureComponent<SearchProps, SearchState> {
|
||||
totalResults: 0,
|
||||
offset: 25,
|
||||
totalPages: 1,
|
||||
currentPage: 1,
|
||||
currentPage: 0,
|
||||
isLoading: true
|
||||
}
|
||||
|
||||
@ -59,7 +59,7 @@ export default class Search extends PureComponent<SearchProps, SearchState> {
|
||||
results: search.results,
|
||||
totalResults: search.totalResults,
|
||||
totalPages: search.totalPages,
|
||||
currentPage: search.page + 1, // first page is always 0 in response
|
||||
currentPage: search.page, // first page is always 0 in response
|
||||
isLoading: false
|
||||
})
|
||||
Logger.log(`Loaded ${this.state.results.length} assets`)
|
||||
|
Loading…
Reference in New Issue
Block a user