From d80530c315fb1ccced541d9e001fe53c56551514 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Fri, 13 Dec 2019 12:22:52 +0100 Subject: [PATCH] fix search --- client/src/routes/Search.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/routes/Search.tsx b/client/src/routes/Search.tsx index e606191..58c7707 100644 --- a/client/src/routes/Search.tsx +++ b/client/src/routes/Search.tsx @@ -41,13 +41,13 @@ class Search extends PureComponent { const { text, page, categories } = queryString.parse(search) if (text) { - this.setState({ + await this.setState({ searchTerm: decodeURIComponent(`${text}`) }) } if (categories) { - this.setState({ + await this.setState({ searchCategories: decodeURIComponent(`${categories}`) }) } @@ -55,7 +55,7 @@ class Search extends PureComponent { // switch to respective page if query string is present if (page) { const currentPage = Number(page) - this.setState({ currentPage }) + await this.setState({ currentPage }) } this.searchAssets()