feat(prices): useIsPremium hook from license.edition #157
Labels
No labels
autopilot:pending-human
source:analyste
source:defenseur
source:human
source:medic
status:approved
status:blocked
status:in-progress
status:needs-clarification
status:needs-fix
status:ready
status:review
status:triage
type:bug
type:feature
type:infra
type:refactor
type:schema
type:security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: maximus/Simpl-Resultat#157
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Add a
useIsPremium()hook reading the existinguseLicensestate. Trivial layer — exists for clarity at call sites.Contract reference
docs/api-contract-prices.md§7.2 —editionis already read byuseLicensehook (cf.src/hooks/useLicense.ts).Fichiers concernés
src/hooks/useIsPremium.ts(new, ~20 lines)src/hooks/useIsPremium.test.ts(new, ~30 lines)Depends on
Scope
src/hooks/useIsPremium.ts:useLicenseviavi.mock:edition === "premium"→ returnstrueedition === "base"→ returnsfalseedition === "free"→ returnsfalseCritères d'acceptation
PriceFetchControl(issue #158)Décisions prises ce soir
useLicense().edition === 'premium') pour la lisibilité aux call sites + pour faciliter le mock dans les tests UI.Edition(free | base | premium) reste inchangée.Spec source
docs/api-contract-prices.mdmaximus referenced this issue2026-05-04 00:38:30 +00:00