From de5434355bf3ae314e5920aa22c25114ff672355 Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Fri, 27 Aug 2021 01:01:58 +0400 Subject: [PATCH] debug --- website/src/App.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/website/src/App.tsx b/website/src/App.tsx index 6fbc845..9386210 100644 --- a/website/src/App.tsx +++ b/website/src/App.tsx @@ -172,8 +172,11 @@ class App extends Component { if (this.state.options.language === "English") { this.handleOptionsUpdate({ type: "toggleLanguage" }); } - const parsedUrl = new URL(window.location as unknown as string); - const searchString = parsedUrl.searchParams.get("text") || ""; + const queryString = window.location.search; + alert("query string is: " + queryString); + const urlParams = new URLSearchParams(queryString); + const searchString = urlParams.get("text") || ""; + alert("text value us:" + searchString); this.handleSearchValueChange(searchString); } if (this.props.location.pathname === "/new-entries") {