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

add page to url

This commit is contained in:
Matthias Kretschmann 2019-04-09 13:51:00 +02:00
parent efbfd91c65
commit a77f01d595
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -10,7 +10,7 @@ import styles from './Search.module.scss'
interface SearchProps {
location: Location
history: History
history: any
}
interface SearchState {
@ -73,6 +73,11 @@ export default class Search extends PureComponent<SearchProps, SearchState> {
}
private setPage = async (page: number) => {
this.props.history.push({
pathname: this.props.location.pathname,
search: `?text=${this.searchTerm}&page=${page}`
})
await this.setState({ currentPage: page, isLoading: true })
await this.searchAssets()
}