+ autocomplete + thunk

This commit is contained in:
2020-07-21 19:39:56 +02:00
parent 29efa13410
commit 2bcbfef8ba
16 changed files with 255 additions and 38 deletions

22
src/reducers/appMode.js Normal file
View File

@@ -0,0 +1,22 @@
const appModeReducer = (state = "init", action) => {
switch (action.type) {
case "APP_INIT":
return (state = "init");
case "APP_SEARCH_RESULTS":
return (state = "search results");
case "APP_LOGIN":
return (state = "login");
case "APP_RESTAURANT":
return (state = "restaurant");
case "APP_DISH":
return (state = "dish");
case "APP_ADD_RESTAURANT":
return (state = "add restaurant");
case "APP_ADD_DISH":
return (state = "add dish");
default:
return state;
}
};
export default appModeReducer;