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:
Arthur Belleville 2026-04-14 22:55:05 +02:00
parent e7b1a04966
commit 4f31275c82
No known key found for this signature in database

View file

@ -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({