mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-29 15:44:13 +00:00
* refactor: remove gRPC feature toggle from CollectionSettings and Presets components * fix: lint error --------- Co-authored-by: Bijin A B <bijin@usebruno.com>
20 lines
548 B
JavaScript
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;
|
|
};
|