diff --git a/src/lib/api-client.ts b/src/lib/api-client.ts index ed2afe6..6ec70a5 100644 --- a/src/lib/api-client.ts +++ b/src/lib/api-client.ts @@ -1,3 +1,6 @@ +import router from '@/router' +import { authClient } from '@/lib/auth-client.ts' + interface ApiEnvelope { data: T | null code: number @@ -5,8 +8,6 @@ interface ApiEnvelope { } async function redirectToSignIn() { - // Imported lazily: the router pulls in views that depend on this module - const [{ default: router }, { authClient }] = await Promise.all([import('@/router'), import('@/lib/auth-client.ts')]) // Refetch so useSession() consumers drop the stale user authClient.$store.notify('$sessionSignal')