2021-07-21 20:08:17 +02:00
|
|
|
/*
|
|
|
|
*
|
2022-07-29 13:45:20 +02:00
|
|
|
* {{ name }} reducer
|
2021-07-21 20:08:17 +02:00
|
|
|
*
|
|
|
|
*/
|
2021-07-22 14:10:54 +02:00
|
|
|
|
2021-07-21 20:08:17 +02:00
|
|
|
import produce from 'immer';
|
|
|
|
import { DEFAULT_ACTION } from './constants';
|
|
|
|
|
|
|
|
export const initialState = {};
|
|
|
|
|
2022-07-30 09:16:19 +02:00
|
|
|
const {{ camelCase name }}Reducer = (state = initialState, action) =>
|
2021-07-21 20:08:17 +02:00
|
|
|
// eslint-disable-next-line consistent-return
|
|
|
|
produce(state, draftState => {
|
|
|
|
switch (action.type) {
|
|
|
|
case DEFAULT_ACTION: {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
return draftState;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2022-07-30 09:16:19 +02:00
|
|
|
export default {{ camelCase name }}Reducer;
|