TorbatYar/frontend/hooks/useTenantId.ts
Mortezakoohjani 12c8615615 Ship enterprise Accounting FE/API with CRUD parity and production wiring.
Adds accounting-service PATCH/archive, fiscal helpers, COA templates and setup status, plus SuperApp Accounting UI (DS, scoreboard, masters, vouchers, ledger, ops modules) with session refresh and HTTPS public API URLs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-24 15:26:43 +03:30

15 lines
321 B
TypeScript

"use client";
import { useMe } from "@/hooks/useMe";
/** Tenant ID جاری برای هدر X-Tenant-ID سرویس حسابداری. */
export function useTenantId() {
const { me, loading, error } = useMe();
return {
tenantId: me?.current_tenant_id ?? null,
loading,
error,
me,
};
}