- Reads useLicense().state.edition === 'premium' - Ergonomic only — server enforces independently (ADR 0011) - 3 vitest tests (premium, base, free) - CLAUDE.md hook count 12 -> 13 Closes #157
10 lines
325 B
TypeScript
10 lines
325 B
TypeScript
import { useLicense } from "./useLicense";
|
|
|
|
/**
|
|
* Returns true if the active license edition is "premium".
|
|
* Ergonomic helper only — the server enforces entitlements independently (cf. ADR 0011 §UX).
|
|
*/
|
|
export function useIsPremium(): boolean {
|
|
const { state } = useLicense();
|
|
return state.edition === "premium";
|
|
}
|