Skip to content

Commit

Permalink
no longer in need of state!
Browse files Browse the repository at this point in the history
  • Loading branch information
rusackas committed Mar 11, 2022
1 parent ec60a86 commit fda05d3
Showing 1 changed file with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ const jsFunctionInfo = (
</div>
);

const jsControlConfig = isFeatureEnabled(
FeatureFlag.ENABLE_JAVASCRIPT_CONTROLS,
);

function jsFunctionControl(
label,
description,
Expand All @@ -75,15 +71,12 @@ function jsFunctionControl(
{extraDescr}
</div>
),
mapStateToProps: state => ({
// eslint-disable-next-line no-negated-condition
warning: !isFeatureEnabled(FeatureFlag.ENABLE_JAVASCRIPT_CONTROLS)
? t(
'This functionality is disabled in your environment for security reasons.',
)
: null,
readOnly: !isFeatureEnabled(FeatureFlag.ENABLE_JAVASCRIPT_CONTROLS),
}),
warning: !isFeatureEnabled(FeatureFlag.ENABLE_JAVASCRIPT_CONTROLS)
? t(
'This functionality is disabled in your environment for security reasons.',
)
: null,
readOnly: !isFeatureEnabled(FeatureFlag.ENABLE_JAVASCRIPT_CONTROLS),
};
}

Expand Down

0 comments on commit fda05d3

Please sign in to comment.