fix(auth): redirect to login immediately on logout
Replace toast-only onSuccess with window.location.href redirect to /login, which also cleanly resets all React state and caches. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e7b1a04966
commit
4f31275c82
1 changed files with 1 additions and 5 deletions
|
|
@ -259,11 +259,7 @@ export function useLogout() {
|
|||
queryClient.removeQueries();
|
||||
},
|
||||
onSuccess: () => {
|
||||
toast.add({
|
||||
title: "Déconnexion réussie",
|
||||
description: "Vous avez été déconnecté avec succès",
|
||||
type: "success",
|
||||
});
|
||||
window.location.href = "/login";
|
||||
},
|
||||
onError: (error) => {
|
||||
toast.add({
|
||||
|
|
|
|||
Loading…
Reference in a new issue