new look / search list / restaurant view

This commit is contained in:
2020-07-24 20:27:05 +02:00
parent 2ab445670e
commit ad2a945965
14 changed files with 208 additions and 44 deletions

14
src/reducers/dishes.js Normal file
View 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;