This commit is contained in:
lingdocs 2021-08-27 01:01:58 +04:00
parent 39f136c0a1
commit de5434355b
1 changed files with 5 additions and 2 deletions

View File

@ -172,8 +172,11 @@ class App extends Component<RouteComponentProps, State> {
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") {