Change some magic values to constants

This commit is contained in:
Chloe Herd 2023-12-18 16:30:56 -05:00
parent 1b5db2c4cf
commit 345265ca17

View file

@ -54,8 +54,8 @@ const routes = [
// Intercept all navigation if a submitted order exists in storage
if (store.getters.hasSubmittedOrder) {
if (to.query.fmgPage !== "vehicle") {
to.query.fmgPage = "confirmation";
if (to.query.fmgPage !== homepageName) {
to.query.fmgPage = fmgPageValues.CONFIRMATION;
}
}
// On entering the funnel "fresh", read cookie information, decide what to do next.
@ -180,7 +180,7 @@ router.beforeEach(async (to, from, next) => {
// Refresh page if navigating to self to prevent locking.
// For now only carved out for vehicle; all modals are opened through anchor tags at the moment,
// which also self navigate, but relied on the page remaining the same on self-navigation.
} else if (toQueryPage === fromQueryPage && toQueryPage === "vehicle") {
} else if (toQueryPage === fromQueryPage && toQueryPage === homepageName) {
router.go(0);
} else {
next();