new look / search list / restaurant view
This commit is contained in:
14
src/reducers/dishes.js
Normal file
14
src/reducers/dishes.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const dishes = (state = [], action) => {
|
||||
switch (action.type) {
|
||||
case "SET_DISHES":
|
||||
return (state = action.payload);
|
||||
case "ADD_DISH":
|
||||
return [...state, action.payload];
|
||||
case "CLEAR_DISHES":
|
||||
return (state = []);
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
};
|
||||
|
||||
export default dishes;
|
||||
Reference in New Issue
Block a user