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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user