Fix some UI issues 2

This commit is contained in:
Urtzi Alfaro
2025-09-24 21:54:49 +02:00
parent d59b92a1b4
commit dc6c6f213f
16 changed files with 1036 additions and 141 deletions

View File

@@ -15,6 +15,7 @@ import {
AuthHealthResponse
} from '../types/auth';
import { ApiError } from '../client';
import { useAuthStore } from '../../stores/auth.store';
// Query Keys
export const authKeys = {
@@ -149,6 +150,11 @@ export const useUpdateProfile = (
onSuccess: (data) => {
// Update the profile cache
queryClient.setQueryData(authKeys.profile(), data);
// Update the auth store user to maintain consistency
const authStore = useAuthStore.getState();
if (authStore.user) {
authStore.updateUser(data);
}
},
...options,
});