diff --git a/client/src/routes/Search.tsx b/client/src/routes/Search.tsx index 85c41ec..e742367 100644 --- a/client/src/routes/Search.tsx +++ b/client/src/routes/Search.tsx @@ -34,8 +34,16 @@ export default class Search extends PureComponent { 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() }