This commit is contained in:
lingdocs 2021-08-27 01:46:20 +04:00
parent bf55f265e8
commit f026bb206b
1 changed files with 3 additions and 5 deletions

View File

@ -173,13 +173,11 @@ class App extends Component<RouteComponentProps, State> {
if (this.state.options.language === "English") {
this.handleOptionsUpdate({ type: "toggleLanguage" });
}
console.log(this.props.history.location);
const queryString = this.props.history.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);
const text = urlParams.get("text") || "";
const inQuotes = text.match(/^"(.+)"/) || ["", ""];
this.handleSearchValueChange(inQuotes[1]);
}
if (this.props.location.pathname === "/new-entries") {
this.setState({