Procházet zdrojové kódy

Slight change

feature/646
Djordje Mitrovic před 3 roky
rodič
revize
b94ed1f6f8
1 změnil soubory, kde provedl 7 přidání a 1 odebrání
  1. 7
    1
      src/util/helpers/routeHelpers.js

+ 7
- 1
src/util/helpers/routeHelpers.js Zobrazit soubor

routeMatches(REGISTER_SUCCESSFUL_PAGE) || routeMatches(REGISTER_SUCCESSFUL_PAGE) ||
routeMatches(FORGOT_PASSWORD_PAGE) || routeMatches(FORGOT_PASSWORD_PAGE) ||
routeMatches(FORGOT_PASSWORD_MAIL_SENT) || routeMatches(FORGOT_PASSWORD_MAIL_SENT) ||
routeMatches(RESET_PASSWORD_PAGE)
dynamicRouteMatches(RESET_PASSWORD_PAGE)
) { ) {
return true; return true;
} }
return false; return false;
}; };
export const dynamicRouteMatches = (dynamicRoute) => {
const charactersToDelete =
(dynamicRoute.length - dynamicRoute.indexOf(":")) * -1;
const newDynamicRoute = dynamicRoute.slice(0, charactersToDelete);
return history.location.pathname.includes(newDynamicRoute);
};

Načítá se…
Zrušit
Uložit