stream-saga/src/actions/index.js

23 lines
506 B
JavaScript
Raw Normal View History

2019-06-19 14:24:21 -04:00
import { ADD_ARTICLE } from "../constants/action-types"
2019-06-21 00:59:25 -04:00
import { SET_CANDIDATE } from "../constants/action-types"
export function setCandidate(payload) {
return { type: SET_CANDIDATE, payload }
}
2019-06-19 14:24:21 -04:00
export function addArticle(payload) {
2019-06-19 16:37:03 -04:00
return { type: ADD_ARTICLE, payload }
2019-06-19 14:24:21 -04:00
}
2019-06-19 17:08:53 -04:00
export function getData() {
2019-06-19 22:37:59 -04:00
return { type: "DATA_REQUESTED" }
2019-06-19 17:08:53 -04:00
}
2019-06-21 10:53:16 -04:00
export function getTrumpData() {
return { type: "DATA_TRUMP_REQUESTED" }
}
export function getHillaryData() {
return { type: "DATA_HILLARY_REQUESTED" }
}