1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

25 items per page, prepare dynamic updating of offset

This commit is contained in:
Matthias Kretschmann 2019-04-05 15:20:38 +02:00
parent 2b7be08d20
commit 410a49f1dc
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -15,6 +15,7 @@ interface SearchProps {
interface SearchState {
results: any[]
offset: number
totalPages: number
currentPage: number
isLoading: boolean
@ -23,6 +24,7 @@ interface SearchState {
export default class Search extends PureComponent<SearchProps, SearchState> {
public state = {
results: [],
offset: 25,
totalPages: 1,
currentPage: 1,
isLoading: true
@ -37,7 +39,7 @@ export default class Search extends PureComponent<SearchProps, SearchState> {
private searchAssets = async () => {
const searchQuery = {
offset: 100,
offset: this.state.offset,
page: this.state.currentPage,
query: {
text: [this.searchTerm],