This commit is contained in:
David Ralph
2021-01-16 22:43:46 +00:00
parent 0a735384df
commit 3ec5a2c199
32 changed files with 530 additions and 182 deletions

View File

@@ -20,7 +20,11 @@ export default class Search extends React.PureComponent {
voiceSearch.start();
const searchText = document.getElementById('searchtext');
voiceSearch.onresult = (event) => searchText.value = event.results[0][0].transcript;
voiceSearch.onend = () => setTimeout(() => window.location.href = this.state.url + `?${this.state.query}=` + searchText.value, 1000);
voiceSearch.onend = () =>{
setTimeout(() => {
window.location.href = this.state.url + `?${this.state.query}=` + searchText.value;
}, 1000);
}
}
render() {