1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-31 00:16:47 +01:00
This commit is contained in:
sveisvei 2016-10-25 11:05:56 +02:00
parent 72950bcbaa
commit 48aaf6c7be
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>);
};
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)));
};
}