Merged in feat(SW-1677)-my-stay-update-contact-user (pull request #1386)

Feat(SW-1677) my stay update contact user

* feat(SW-1677): Hide membersettings that doesnt match the booking

* feat(SW-1677) Edit my stay contact details as user


Approved-by: Linus Flood
This commit is contained in:
Pontus Dreij
2025-02-24 11:31:19 +00:00
parent 49aaca9d28
commit 76cd1945c4
2 changed files with 38 additions and 6 deletions

View File

@@ -94,7 +94,14 @@ 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 {
router.push(profile[lang])
const myStayReturnRoute = localStorage.getItem("myStayReturnRoute")
if (myStayReturnRoute) {
const returnRoute = JSON.parse(myStayReturnRoute)
localStorage.removeItem("myStayReturnRoute")
router.push(returnRoute.path)
} else {
router.push(profile[lang])
}
router.refresh() // Can be removed on NextJs 15
}
break