Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (err) {
console.log(err);
return navigateTo('/strange-place');
}
if (authResult && authResult.accessToken && authResult.idToken) {
return (
this.setSession(authResult)
.then(user => {
updateUserSignedIn(true);
return fetchUserComplete(user);
})
// this could be current-challenge
.then(() => navigateTo('/#'))
);
}
return navigateTo('/strange-place');
});
}
onSuggestionSelected = (e, {suggestion}) => {
const prefix = this.props.prefixSlash ? '/' : '';
navigateTo(prefix + suggestion.url);
};
onKeyPress(event) {
if (event.keyCode === 37) {
navigateTo(this.state.previous)
} else if (event.keyCode === 39) {
navigateTo(this.state.next)
}
}
this.debouncedSetState = setTimeout(() => {
const url = searchStateToUrl(this.props, searchState);
navigateTo(url);
}, updateAfter);
this.setState({ searchState });
onKeyPress(event) {
if (event.keyCode === 37) {
navigateTo(this.state.previous)
} else if (event.keyCode === 39) {
navigateTo(this.state.next)
}
}
(href) => navigateTo(href),
config.pathPrefix
onSwipedRight = e => {
const toScreen = this.getToScreen(PREV);
navigateTo(toScreen);
};
readStory() {
navigateTo(`/stories/${this.props.slug}`)
}
this.setState({ activeKey: key }, () => {
navigateTo(to);
});
}
const goBack = () => navigateTo('/stories')
const {