feat(SW-307): Updated logout navigation

This commit is contained in:
Hrishikesh Vaipurkar
2024-08-26 14:48:30 +02:00
parent 0eb295fdaa
commit 39870763c3

View File

@@ -90,7 +90,8 @@ export default function Form({ user }: EditFormProps) {
toast.success(response.message)
utils.user.get.invalidate()
if (isPasswordChanged) {
router.push(logout[lang])
// Kept logout out of Next router forcing browser to navigate on logout url
window.location.href = logout[lang]
} else {
router.push(profile[lang])
}