Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
) => (
ToggledComponent: React.ComponentType
): React.ComponentType =>
// @ts-ignore
flowRight(
setDisplayName(wrapDisplayName(ToggledComponent, 'branchOnFeatureToggle')),
injectFeatureToggle(flag),
branchOnFeatureToggle(
UntoggledComponent,
DEFAULT_FLAG_PROP_KEY,
variation
)
)(ToggledComponent);
export default (flagName: FlagName, propKey?: string) => (
Component: React.ComponentType
): React.ComponentType =>
flowRight(
setDisplayName(wrapDisplayName(Component, 'injectFeatureToggle')),
withFlags(),
// @ts-ignore
injectFeatureToggle(flagName, propKey)
)(Component);
) => (
Component: React.ComponentType
): React.ComponentType =>
flowRight(
setDisplayName(wrapDisplayName(Component, 'injectFeatureToggles')),
withFlags(),
// @ts-ignore
injectFeatureToggles(flagNames, propKey, areOwnPropsEqual)
)(Component);
export default (flagName: FlagName, propKey?: string) => (
Component: React.ComponentType
): React.ComponentType =>
flowRight(
setDisplayName(wrapDisplayName(Component, 'injectFeatureToggle')),
// @ts-ignore
connect(mapStateToProps),
injectFeatureToggle(flagName, propKey)
)(Component);
) => (
Component: React.ComponentType
): React.ComponentType =>
flowRight(
setDisplayName(wrapDisplayName(Component, 'injectFeatureToggles')),
// @ts-ignore
connect(mapStateToProps),
injectFeatureToggles(flagNames, propKey, areOwnPropsEqual)
)(Component);
) => (
ToggledComponent: React.ComponentType
): React.ComponentType =>
// @ts-ignore
flowRight(
setDisplayName(wrapDisplayName(ToggledComponent, 'branchOnFeatureToggle')),
injectFeatureToggle(flag),
branchOnFeatureToggle(
UntoggledComponent,
DEFAULT_FLAG_PROP_KEY,
variation
)
)(ToggledComponent);
export default (flagName: FlagName, propKey?: string) => (
Component: React.ComponentType
): React.ComponentType =>
flowRight(
setDisplayName(wrapDisplayName(Component, 'injectFeatureToggle')),
withFlags(),
// @ts-ignore
injectFeatureToggle(flagName, propKey)
)(Component);
export default (flagName: FlagName, propKey?: string) => (
Component: React.ComponentType
): React.ComponentType =>
flowRight(
setDisplayName(wrapDisplayName(Component, 'injectFeatureToggle')),
// @ts-ignore
connect(mapStateToProps),
injectFeatureToggle(flagName, propKey)
)(Component);
) => (
Component: React.ComponentType
): React.ComponentType =>
flowRight(
setDisplayName(wrapDisplayName(Component, 'injectFeatureToggles')),
withFlags(),
// @ts-ignore
injectFeatureToggles(flagNames, propKey, areOwnPropsEqual)
)(Component);
) => (
Component: React.ComponentType
): React.ComponentType =>
flowRight(
setDisplayName(wrapDisplayName(Component, 'injectFeatureToggles')),
// @ts-ignore
connect(mapStateToProps),
injectFeatureToggles(flagNames, propKey, areOwnPropsEqual)
)(Component);