diff --git a/frontend/hooks/useTenantId.ts b/frontend/hooks/useTenantId.ts index e957d79..7ea27b4 100644 --- a/frontend/hooks/useTenantId.ts +++ b/frontend/hooks/useTenantId.ts @@ -2,12 +2,12 @@ import { useMe } from "@/hooks/useMe"; -/** Tenant ID جاری برای هدر X-Tenant-ID سرویس حسابداری. */ +/** Tenant ID جاری برای هدر X-Tenant-ID سرویس حسابداری (از کش مشترک useMe). */ export function useTenantId() { const { me, loading, error } = useMe(); return { tenantId: me?.current_tenant_id ?? null, - loading, + loading: loading && !me, error, me, };