40 lines
558 B
JavaScript
Raw Normal View History

2018-04-04 17:14:08 +02:00
import {
2018-04-16 18:13:36 +02:00
GET_ARTICLES,
GET_ARTICLES_SUCCEEDED,
2018-04-04 17:14:08 +02:00
ON_CHANGE,
SUBMIT,
SUBMIT_SUCCEEDED,
} from './constants';
2018-04-16 18:13:36 +02:00
export function getArticles() {
return {
type: GET_ARTICLES,
};
}
export function getArticlesSucceeded(articles) {
return {
type: GET_ARTICLES_SUCCEEDED,
articles,
};
}
2018-04-04 17:14:08 +02:00
export function onChange({ target }) {
return {
type: ON_CHANGE,
value: target.value,
};
}
export function submit() {
return {
type: SUBMIT,
};
}
export function submitSucceeded() {
return {
type: SUBMIT_SUCCEEDED,
};
}