Skip to content

Instantly share code, notes, and snippets.

@JohnRandom
Last active June 25, 2022 07:06
Show Gist options
  • Save JohnRandom/659d9fb878db5fcba7786c2c137bc4a8 to your computer and use it in GitHub Desktop.
Save JohnRandom/659d9fb878db5fcba7786c2c137bc4a8 to your computer and use it in GitHub Desktop.
if (step === finalStep) {
// Handle all LOCATION_CHANGE action from react-router-redux.
if (action.type === '@@router/LOCATION_CHANGE';) {
// Make sure the user is redirected away from on-boarding exclusive URLs.
if (exclusiveUrls.indexOf(action.payload.pathname) >= 0) {
store.dispatch( push('/somewhere/else') );
}
}
// If we're already on the last step, we don't need to steer the flow anymore,
// so we can safely return.
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment