Merged in feat/SW-1676-modify-contact-details-my-stay-anonymous (pull request #1468)
Feat/SW-1676 modify contact details my stay anonymous * feat(SW-1676): Modify guest details step 1 * feat(SW-1676) Integration to api to update guest details * feat(SW-1676) Reuse of old modal * feat(SW-1676) updated modify guest * feat(SW-1676) cleanup * feat(SW-1676) updated myStayReturnRoute to sessionStorage Approved-by: Niclas Edenvin
This commit is contained in:
@@ -94,10 +94,10 @@ export default function Form({ user }: EditFormProps) {
|
||||
// Kept logout out of Next router forcing browser to navigate on logout url
|
||||
window.location.href = logout[lang]
|
||||
} else {
|
||||
const myStayReturnRoute = localStorage.getItem("myStayReturnRoute")
|
||||
const myStayReturnRoute = sessionStorage.getItem("myStayReturnRoute")
|
||||
if (myStayReturnRoute) {
|
||||
const returnRoute = JSON.parse(myStayReturnRoute)
|
||||
localStorage.removeItem("myStayReturnRoute")
|
||||
sessionStorage.removeItem("myStayReturnRoute")
|
||||
router.push(returnRoute.path)
|
||||
} else {
|
||||
router.push(profile[lang])
|
||||
|
||||
Reference in New Issue
Block a user