Files
bruno/packages/bruno-app/src/utils/beta-features.js
sanish chirayath 1d0ba135ff Enable gRPC (Beta to GA) (#5687)
* refactor: remove gRPC feature toggle from CollectionSettings and Presets components

* fix: lint error

---------

Co-authored-by: Bijin A B <bijin@usebruno.com>
2025-10-06 23:16:19 +05:30

20 lines
548 B
JavaScript

import { useSelector } from 'react-redux';
/**
* Beta features configuration object
* Contains all available beta feature keys
*/
export const BETA_FEATURES = Object.freeze({
NODE_VM: 'nodevm'
});
/**
* Hook to check if a beta feature is enabled
* @param {string} featureName - The name of the beta feature
* @returns {boolean} - Whether the feature is enabled
*/
export const useBetaFeature = (featureName) => {
const preferences = useSelector((state) => state.app.preferences);
return preferences?.beta?.[featureName] || false;
};