(feature: PlanFeature)
| 224 | } |
| 225 | |
| 226 | export function usePlanFeature(feature: PlanFeature) { |
| 227 | const loadSubscription = useAppStore((state) => state.loadSubscription); |
| 228 | const hasFeature = useAppStore((state) => state.hasFeature(feature)); |
| 229 | useEffect(() => { |
| 230 | void loadSubscription(); |
| 231 | }, [loadSubscription]); |
| 232 | return hasFeature; |
| 233 | } |
| 234 | |
| 235 | export function useWorkspacePermission(permission: Permission) { |
| 236 | const allowed = useAppStore((state) => |
no test coverage detected