fix: invalidate tanstack caches on user auth (#5341)

* fix: invalidate tanstack caches on user auth

* refactor: clean up invalidate flow

* fix: lint
This commit is contained in:
Calum H.
2026-02-09 14:43:33 +00:00
committed by GitHub
parent e962521492
commit 90438a1ad5
16 changed files with 105 additions and 198 deletions

View File

@@ -1,3 +1,5 @@
import { useAppQueryClient } from '@/composables/query-client'
export const useUser = async (force = false) => {
const user = useState('user', () => {})
@@ -158,5 +160,6 @@ export const logout = async () => {
await useAuth('none')
useCookie('auth-token').value = null
useAppQueryClient().clear()
stopLoading()
}