diff --git a/packages/unleash-frontend-next/src/component/strategies/add-strategy.jsx b/packages/unleash-frontend-next/src/component/strategies/add-strategy.jsx index 66aa7099ad..80f43d35f5 100644 --- a/packages/unleash-frontend-next/src/component/strategies/add-strategy.jsx +++ b/packages/unleash-frontend-next/src/component/strategies/add-strategy.jsx @@ -8,19 +8,17 @@ function gerArrayWithEntries (num) { } export const PARAM_PREFIX = 'param_'; -const genParams = (input, num = 0, setValue) => { - return (
{gerArrayWithEntries(num).map((v, i) => { - const key = `${PARAM_PREFIX}${i + 1}`; - return ( - setValue(key, value)} - value={input[key]} /> - ); - })}
); -}; +const genParams = (input, num = 0, setValue) => (
{gerArrayWithEntries(num).map((v, i) => { + const key = `${PARAM_PREFIX}${i + 1}`; + return ( + git statugitsetValue(key, value)} + value={input[key]} /> + ); +})}
); const AddStrategy = ({ input, diff --git a/packages/unleash-frontend-next/src/store/strategy-actions.js b/packages/unleash-frontend-next/src/store/strategy-actions.js index cc006c7084..8421a1384c 100644 --- a/packages/unleash-frontend-next/src/store/strategy-actions.js +++ b/packages/unleash-frontend-next/src/store/strategy-actions.js @@ -53,11 +53,9 @@ export function createStrategy (strategy) { export function removeStrategy (strategy) { - return dispatch => { - return api.remove(strategy) + return dispatch => api.remove(strategy) .then(() => dispatch(createRemoveStrategy(strategy))) .catch(error => dispatch(errorCreatingStrategy(error))); - }; }