Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
handleSubmit(event) {
event.preventDefault();
event.stopPropagation();
Scrivito.navigateTo(() => Scrivito.currentPage(), { q: this.state.q });
}
}
handleSubmit(event) {
event.preventDefault();
event.stopPropagation();
Scrivito.navigateTo(oldestSearchResultsPage, { q: this.state.q });
this.setState({ q: "" });
this.props.toggleSearch();
}
}
setTag={newTag => {
const newParams = { q: params.q };
if (newTag) {
newParams.tag = newTag;
}
Scrivito.navigateTo(() => Scrivito.currentPage(), newParams);
}}
currentTag={params.tag}
function navigateToBlogWithTag(tag) {
const params = {};
if (tag) {
params.tag = tag;
}
Scrivito.navigateTo(() => Scrivito.Obj.getByPermalink("blog"), params);
}