mirror of
https://github.com/strapi/strapi.git
synced 2025-07-23 17:10:08 +00:00
25 lines
468 B
Handlebars
25 lines
468 B
Handlebars
/*
|
|
*
|
|
* {{ name }} reducer
|
|
*
|
|
*/
|
|
|
|
import produce from 'immer';
|
|
import { DEFAULT_ACTION } from './constants';
|
|
|
|
export const initialState = {};
|
|
|
|
const {{ camelCase name }}Reducer = (state = initialState, action) =>
|
|
// eslint-disable-next-line consistent-return
|
|
produce(state, draftState => {
|
|
switch (action.type) {
|
|
case DEFAULT_ACTION: {
|
|
break;
|
|
}
|
|
default:
|
|
return draftState;
|
|
}
|
|
});
|
|
|
|
export default {{ camelCase name }}Reducer;
|