mirror of
https://github.com/strapi/strapi.git
synced 2025-07-23 00:51:17 +00:00
25 lines
462 B
Handlebars
25 lines
462 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;
|