18F/State-TalentMAP

View on GitHub
src/reducers/post/post.js

Summary

Maintainability
A
0 mins
Test Coverage
export function postHasErrored(state = false, action) {
switch (action.type) {
case 'POST_HAS_ERRORED':
return action.hasErrored;
default:
return state;
}
}
export function postIsLoading(state = false, action) {
switch (action.type) {
case 'POST_IS_LOADING':
return action.isLoading;
default:
return state;
}
}
export function post(state = {}, action) {
switch (action.type) {
case 'POST_FETCH_DATA_SUCCESS':
return action.post;
default:
return state;
}
}