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:
parent
2b7be08d20
commit
410a49f1dc
@ -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],
|
||||
|
Loading…
Reference in New Issue
Block a user