web client v 0.1
This commit is contained in:
@@ -6,16 +6,15 @@ const initialState = {
|
||||
userId: "",
|
||||
userEmail: "",
|
||||
dialogs: {
|
||||
logIn: false,
|
||||
register: false,
|
||||
newRestaurant: true,
|
||||
contact: false,
|
||||
pricing: false,
|
||||
regulamin: false,
|
||||
registerCircularProgress: false,
|
||||
registerForm: true,
|
||||
registerResult: "",
|
||||
loginResult: "",
|
||||
regulamin: false,
|
||||
reminderResult: "",
|
||||
reminderCircularProgress: false,
|
||||
resetResult: "",
|
||||
resetCircularProgress: false,
|
||||
},
|
||||
tempData: {},
|
||||
};
|
||||
@@ -26,8 +25,6 @@ const data = (state = initialState, action) => {
|
||||
return (state = { ...state, showDishList: true });
|
||||
case "SET_DISHLIST_HIDDEN":
|
||||
return (state = { ...state, showDishList: false });
|
||||
case "DIALOG_LOGIN_VISIBLE":
|
||||
return (state = { ...state, dialogs: { ...state.dialogs, logIn: true } });
|
||||
case "SET_LOGGEDIN":
|
||||
return (state = {
|
||||
...state,
|
||||
@@ -46,36 +43,21 @@ const data = (state = initialState, action) => {
|
||||
userEmail: "",
|
||||
userId: "",
|
||||
});
|
||||
case "DIALOG_LOGIN_HIDDEN":
|
||||
return (state = {
|
||||
...state,
|
||||
dialogs: { ...state.dialogs, logIn: false },
|
||||
});
|
||||
case "DIALOG_REGISTER_VISIBLE":
|
||||
return (state = {
|
||||
...state,
|
||||
dialogs: { ...state.dialogs, register: true },
|
||||
});
|
||||
case "DIALOG_REGISTER_HIDDEN":
|
||||
return (state = {
|
||||
...state,
|
||||
dialogs: { ...state.dialogs, register: false },
|
||||
});
|
||||
case "DIALOG_REGULAMIN_VISIBLE":
|
||||
return (state = {
|
||||
...state,
|
||||
dialogs: { ...state.dialogs, regulamin: true },
|
||||
});
|
||||
case "DIALOG_REGULAMIN_HIDDEN":
|
||||
return (state = {
|
||||
...state,
|
||||
dialogs: { ...state.dialogs, regulamin: false },
|
||||
});
|
||||
case "DIALOG_REGISTER_CIRCLE_SHOW":
|
||||
return (state = {
|
||||
...state,
|
||||
dialogs: { ...state.dialogs, registerCircularProgress: true },
|
||||
});
|
||||
case "DIALOG_REGULAMIN_SHOW":
|
||||
return (state = {
|
||||
...state,
|
||||
dialogs: { ...state.dialogs, regulamin: true },
|
||||
});
|
||||
case "DIALOG_REGULAMIN_HIDE":
|
||||
return (state = {
|
||||
...state,
|
||||
dialogs: { ...state.dialogs, regulamin: false },
|
||||
});
|
||||
case "DIALOG_REGISTER_CIRCLE_HIDE":
|
||||
return (state = {
|
||||
...state,
|
||||
@@ -91,20 +73,40 @@ const data = (state = initialState, action) => {
|
||||
...state,
|
||||
dialogs: { ...state.dialogs, registerResult: action.payload },
|
||||
});
|
||||
case "DIALOG_REMINDER_SET_RESULT":
|
||||
return (state = {
|
||||
...state,
|
||||
dialogs: { ...state.dialogs, reminderResult: action.payload },
|
||||
});
|
||||
case "DIALOG_REMINDER_CIRCLE_SHOW":
|
||||
return (state = {
|
||||
...state,
|
||||
dialogs: { ...state.dialogs, reminderCircularProgress: true },
|
||||
});
|
||||
case "DIALOG_REMINDER_CIRCLE_HIDE":
|
||||
return (state = {
|
||||
...state,
|
||||
dialogs: { ...state.dialogs, reminderCircularProgress: false },
|
||||
});
|
||||
case "DIALOG_RESET_CIRCLE_SHOW":
|
||||
return (state = {
|
||||
...state,
|
||||
dialogs: { ...state.dialogs, resetCircularProgress: true },
|
||||
});
|
||||
case "DIALOG_RESET_CIRCLE_HIDE":
|
||||
return (state = {
|
||||
...state,
|
||||
dialogs: { ...state.dialogs, resetCircularProgress: false },
|
||||
});
|
||||
case "DIALOG_LOGIN_SET_RESULT":
|
||||
return (state = {
|
||||
...state,
|
||||
dialogs: { ...state.dialogs, loginResult: action.payload },
|
||||
});
|
||||
case "DIALOG_NEWRESTAURANT_HIDE":
|
||||
case "DIALOG_RESET_SET_RESULT":
|
||||
return (state = {
|
||||
...state,
|
||||
dialogs: { ...state.dialogs, newRestaurant: false },
|
||||
});
|
||||
case "DIALOG_NEWRESTAURANT_SHOW":
|
||||
return (state = {
|
||||
...state,
|
||||
dialogs: { ...state.dialogs, newRestaurant: true },
|
||||
dialogs: { ...state.dialogs, resetResult: action.payload },
|
||||
});
|
||||
case "SET_TEMP_DATA":
|
||||
return (state = { ...state, tempData: action.payload });
|
||||
|
||||
Reference in New Issue
Block a user