mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
switch to respective page if query string is present
This commit is contained in:
parent
2a2955d593
commit
efbfd91c65
@ -34,8 +34,16 @@ export default class Search extends PureComponent<SearchProps, SearchState> {
|
||||
|
||||
private readonly searchTerm = queryString.parse(this.props.location.search)
|
||||
.text
|
||||
private readonly searchPage = queryString.parse(this.props.location.search)
|
||||
.page
|
||||
|
||||
public async componentDidMount() {
|
||||
// switch to respective page if query string is present
|
||||
if (this.searchPage) {
|
||||
const currentPage = Number(this.searchPage)
|
||||
await this.setState({ currentPage })
|
||||
}
|
||||
|
||||
public componentDidMount() {
|
||||
this.searchAssets()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user