From 528978950721097601f244594e26f9d75614e691 Mon Sep 17 00:00:00 2001 From: Supra4E8C <69194597+LTbinglingfeng@users.noreply.github.com> Date: Mon, 9 Mar 2026 17:45:38 +0800 Subject: [PATCH] fix(auth): clear usage stats store on logout --- src/stores/useAuthStore.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/stores/useAuthStore.ts b/src/stores/useAuthStore.ts index cf3470b..64d920f 100644 --- a/src/stores/useAuthStore.ts +++ b/src/stores/useAuthStore.ts @@ -10,6 +10,7 @@ import { STORAGE_KEY_AUTH } from '@/utils/constants'; import { secureStorage } from '@/services/storage/secureStorage'; import { apiClient } from '@/services/api/client'; import { useConfigStore } from './useConfigStore'; +import { useUsageStatsStore } from './useUsageStatsStore'; import { detectApiBaseFromLocation, normalizeApiBase } from '@/utils/connection'; interface AuthStoreState extends AuthState { @@ -136,6 +137,7 @@ export const useAuthStore = create()( logout: () => { restoreSessionPromise = null; useConfigStore.getState().clearCache(); + useUsageStatsStore.getState().clearUsageStats(); set({ isAuthenticated: false, apiBase: '',