+ autocomplete + thunk
This commit is contained in:
22
src/reducers/appMode.js
Normal file
22
src/reducers/appMode.js
Normal 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;
|
||||
Reference in New Issue
Block a user