feat(SW-307): Updated logout navigation
This commit is contained in:
@@ -90,7 +90,8 @@ export default function Form({ user }: EditFormProps) {
|
|||||||
toast.success(response.message)
|
toast.success(response.message)
|
||||||
utils.user.get.invalidate()
|
utils.user.get.invalidate()
|
||||||
if (isPasswordChanged) {
|
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 {
|
} else {
|
||||||
router.push(profile[lang])
|
router.push(profile[lang])
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user