loadReservationById(resId) { let newurl = window.location.protocol + "//" + window.location.host + window.location.pathname + '?resId=' + resId; history.push('/reservation/validate?resId=' + resId); console.log("ResId: " + resId); window.location.reload(); }
/** Execute onAction from a Route (e.g. login/logout)*/ onAction(action) { if (action === "Login") { this.setLoggedIn(AuthenticationService.isUserLoggedIn()); } else if (action === "Logout") { AuthenticationService.logoutUser(); this.setLoggedIn(AuthenticationService.isUserLoggedIn()); history.push("/"); } }
this.history.listen(() => window.scrollTo(0, 0) )
history.push('/cart');
onSelect={(to) => { if (window.location.pathname !== "/dashboard" + to) { history.push("/dashboard" + to);