refactor: remove canUseFeature from useSubscription
No external call sites existed. Feature gating now handled by useFeatureFlag hook backed by the feature_flags system. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,11 +10,6 @@ export function useSubscription() {
|
|||||||
|
|
||||||
const isPaidPlan = plan === 'pro' || plan === 'team'
|
const isPaidPlan = plan === 'pro' || plan === 'team'
|
||||||
|
|
||||||
const canUseFeature = (feature: 'custom_branding' | 'priority_support'): boolean => {
|
|
||||||
if (!limits) return false
|
|
||||||
return limits[feature]
|
|
||||||
}
|
|
||||||
|
|
||||||
const isAtTreeLimit = (): boolean => {
|
const isAtTreeLimit = (): boolean => {
|
||||||
if (!limits || !usage) return false
|
if (!limits || !usage) return false
|
||||||
if (limits.max_trees === null) return false // unlimited
|
if (limits.max_trees === null) return false // unlimited
|
||||||
@@ -37,7 +32,6 @@ export function useSubscription() {
|
|||||||
usage,
|
usage,
|
||||||
isActive,
|
isActive,
|
||||||
isPaidPlan,
|
isPaidPlan,
|
||||||
canUseFeature,
|
|
||||||
isAtTreeLimit,
|
isAtTreeLimit,
|
||||||
isAtSessionLimit,
|
isAtSessionLimit,
|
||||||
formatLimit,
|
formatLimit,
|
||||||
|
|||||||
Reference in New Issue
Block a user