1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00
This commit is contained in:
sveisvei 2016-10-25 11:05:56 +02:00 committed by Ivar Conradi Østhus
parent 75eedc9f82
commit a79ee7e0e8
2 changed files with 12 additions and 16 deletions

View File

@ -8,19 +8,17 @@ function gerArrayWithEntries (num) {
}
export const PARAM_PREFIX = 'param_';
const genParams = (input, num = 0, setValue) => {
return (<div>{gerArrayWithEntries(num).map((v, i) => {
const genParams = (input, num = 0, setValue) => (<div>{gerArrayWithEntries(num).map((v, i) => {
const key = `${PARAM_PREFIX}${i + 1}`;
return (
<Input
type="text"
label={`Parameter name ${i + 1}`}
name={key} key={key}
onChange={(value) => setValue(key, value)}
onChange={(value) => git statugitsetValue(key, value)}
value={input[key]} />
);
})}</div>);
};
})}</div>);
const AddStrategy = ({
input,

View File

@ -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)));
};
}