Skip to content

Commit

Permalink
FEATURE: implement way to temporarily ignore redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
merefield committed Sep 6, 2023
1 parent fee56c2 commit 8332818
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export default {
withPluginApi("0.8.36", (api) => {
api.onAppEvent("page:changed", (data) => {
const currentUser = api.getCurrentUser();
const searchParams = new URLSearchParams(window.location.search);

if (currentUser) {
const redirectToWizard = currentUser.redirect_to_wizard;
Expand All @@ -30,6 +31,7 @@ export default {
.concat(["loading"]);
if (
redirectToWizard &&
!searchParams.has('ignore_redirect') &&
data.currentRouteName !== "customWizardStep" &&
!excludedPaths.find((p) => {
return data.currentRouteName.indexOf(p) > -1;
Expand Down

0 comments on commit 8332818

Please sign in to comment.